Title: lambda calculus - if more parameters needed
Tags: lambda;functional-programming;sicp
Question: Lambda Calculus Question:

```TRUE = lambda x y . x
FALSE = lambda x y . y
1 = lambda s z . s z
2 = lambda s z . s (s z) ...

BoolAnd = lambda x y . x y FALSE
BoolOr = lambda x y. x TRUE y
BoolNot = lambda x . x FALSE TRUE 

If I want to know the result of BoolNot 1:
BoolNot 1
(lambda x . x FALSE TRUE)(lambda s z . s (s z))
(lambda s z . s z) FALSE TRUE
(lambda x y . y) (lambda x y . x)
```

Here needs x and y 2 parameters, but only have 1 here,
How can I continue this calculus?


Here is the accepted answer: ```λ x y. E``` is "shorthand" for ```λx. (λy. E)```.

Thus,

```(λ x y. y) (λ x y. x)

==&gt; (λx. (λy. y)) (λ x y. x)

==&gt; λy. y
```

That is, the identity function.

Comment for this answer: Thanks, but could you tell me what does λy. y mean?
Comment for this answer: @Andy I'm not sure what you're asking, but `λ` is the lowercase greek character "lambda", if that's what you're wondering.

Here is another answer: Think that you apply one argument at the time and at each step you have a function taking one less. It doesn't make sense to do ```(not 1)``` but the result is the identity function since ```true``` becomes the variable not used and thus it will take another argument ```y``` and evaluate to ```y```


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2016:00:09/06/16', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<lambda><functional-programming><sicp>', 'Title': 'lambda calculus - if more parameters needed', 'ViewCount': 47, 'id': 39355735, 'user_AboutMe': '', 'user_AccountId': 5186696.0, 'user_DisplayName': 'Andy', 'user_Reputation': 13.0, 'user_Views': 3.0, 'user_id': 4150880.0}}