Archives

Lambda Calculus via C# (8) Undecidability of Equivalence
[LINQ via C#]  [Lambda Calculus]

Lambda Calculus via C# (23) Y Combinator, And Divide
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (22) Iota Combinator
[Obsolete] See latest version  [Lambda Calculus]
Language with 1 element
Iota is an esoteric programming language with minimum elements but still Turingcomplete. Iota's universal combinator is:
ι := λf.f S K ≡ λf.f (λx.λy.λz.x z (y z)) (λx.λy.x)
That’s the whole language.

Lambda Calculus via C# (21) SKI Combinator Calculus
[Obsolete] See latest version  [Lambda Calculus]
The previous part shows SKI calculus is untyped and strongly typed C# implementation does not work. So here comes the SKI in untyped C#:
public static partial class SkiCombinators { public static Func<dynamic, Func<dynamic, Func<dynamic, dynamic>>> S = x => y => z => x(z)(y(z)); public static Func<dynamic, Func<dynamic, dynamic>> K = x => _ => x; public static Func<dynamic, dynamic> I = x => x; }
Notice closed types (Func<dynamic, …>) are used instead of open type (Func<T, …>) in previous part. So S, K and I do not have to be in the form of C# methods.

Lambda Calculus via C# (20) Combinators
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (19) Church Encoding, And More
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (18) Encoding Signed Number
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (17) Encoding Church List with Fold (Aggregate) Function
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (16) Encoding Church List with 2 Church Pairs as a Node
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (15) Encoding Church List with Church Pair, And Null
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (14) Church Pair (2Tuple) and Church Numeral Decrease
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (13) Encoding Church Pairs (2Tuples) and Generic Church Booleans
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (12) Church Numeral Comparison Operators
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (11) Predicates, And Divide
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (10) Church Numeral Arithmetic Operators
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (9) Wrapping Church Numerals And Arithmetic
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (8) Church Numeral Arithmetic
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (7) Encoding Church Numerals
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (6) If Logic, And Reduction Strategies
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (5) Boolean Logic
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (4) Encoding Church Booleans
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (3) Fundamentals  Function composition
[Obsolete] See latest version  [Lambda Calculus]

Lambda Calculus via C# (2) Fundamentals  Lambda Expression, Variables, Reductions
[Obsolete] See latest version  [Lambda Calculus]
The C# lambda expression has been discussed in detail. This post will explain lambda expression and other concepts in lambda calculus.
Lambda expression
In lambda calculus, the syntax of lambda expressions are:
 Variables v1, v2, …, vN
 The abstraction symbols lambda (λ) and dot (.)
 For example, the C# lambda expression x => x + 1 will be λx.x + 1 in lambda calculus, except the C# specific type system (Int32, Int 64, …) does not exist in λx.x + 1.
 Parentheses (), meaning higher precedence

Lambda Calculus via C# (1) Fundamentals  Closure, Currying and Partial Application
[Obsolete] See latest version  [Lambda Calculus]