Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2021 August 13

From Wikipedia, the free encyclopedia
Mathematics desk
< August 12 << Jul | August | Sep >> Current desk >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


August 13

[edit]

Lambda expressions

[edit]

This paper from Cornell (http://www.cs.cornell.edu/courses/cs312/2008sp/recitations/rec26.html) states that the following two lambda expressions are equivalent:

λx. λy. y

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

I'm not sure why they are equivalent. The first lambda expression takes an arbitrary variable as a parameter and returns the identity function. The second one takes a variable and applies it to the identity function. How are those the same thing? --PuzzledvegetableIs it teatime already? 02:32, 13 August 2021 (UTC)[reply]

It is clearly a (very confusing) typo. The first expression is meant to read λx. x λy. y. The expressions are then not merely equivalent, but the same, just like in high-school algebra a + b × c is "the same" as a + (b × c).  --Lambiam 07:32, 13 August 2021 (UTC)[reply]