[racket] Is there a name for: (lambda (x) (x)) ?

From: Eric Hanchrow (eric.hanchrow at gmail.com)
Date: Sun Sep 26 13:22:38 EDT 2010

 (map (curryr apply '())
       (list
        (lambda () 1)
        (lambda () 2)
        (lambda () 3)))

On Thu, Sep 23, 2010 at 1:36 PM, Jos Koot <jos.koot at telefonica.net> wrote:
> Sorry, I was too hasty.
> Thanks for the correctrion.
> Jos
>
>> -----Original Message-----
>> From: users-bounces at racket-lang.org
>> [mailto:users-bounces at racket-lang.org] On Behalf Of David Van Horn
>> Sent: 23 September 2010 17:19
>> To: users at racket-lang.org
>> Subject: Re: [racket] Is there a name for: (lambda (x) (x)) ?
>>
>> On 9/23/10 11:02 AM, Jos Koot wrote:
>> > I often wondered why -identity- is not included in the exports of
>> > racket/base.
>> > But which functions would we choose?
>> > (lambda (x) x)
>> > or
>> > (lambda x (apply values x))
>> > which can simply be wrtitten as
>> > values
>> > So -values- may be the identity you are looking for.
>>
>> Jos -- your eyes missed a set of parens.  The function in question is:
>>
>>     (lambda (x) (x))
>>
>> not
>>
>>     (lambda (x) x)
>>
>> David
>> _________________________________________________
>>   For list-related administrative tasks:
>>   http://lists.racket-lang.org/listinfo/users
>
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>


Posted on the users mailing list.