From: Jim Pryor Date: Thu, 16 Sep 2010 20:38:17 +0000 (-0400) Subject: tweak week2 X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=4c104967a46d8a4fb341d202d7bdaa091b7b904a tweak week2 Signed-off-by: Jim Pryor --- diff --git a/week2.mdwn b/week2.mdwn index 15995e8c..21c423e3 100644 --- a/week2.mdwn +++ b/week2.mdwn @@ -26,13 +26,13 @@ Combinators and Combinatorial Logic Lambda expressions that have no free variables are known as **combinators**. Here are some common ones: -
+
**I** is defined to be `\x x`

**K** is defined to be `\x y. x`, That is, it throws away its second argument. So `K x` is a constant function from any (further) argument to `x`. ("K" for "constant".) Compare K to our definition of **true**.

**get-first** was our function for extracting the first element of an ordered pair: `\fst snd. fst`. Compare this to K and true as well.

**get-second** was our function for extracting the second element of an ordered pair: `\fst snd. snd`. Compare this to our definition of false.

**ω** is defined to be: `\x. x x`

-

+ It's possible to build a logical system equally powerful as the lambda calculus (and readily intertranslatable with it) using just combinators, considered as atomic operations. Such a language doesn't have any variables in it: not just no free variables, but no variables at all.