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

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu Sep 23 09:23:07 EDT 2010

I just write (λ (t) (t)) when it happens to me. It doesn't really seem
like it needs a separate name (but maybe I'm in a bit too deep).

Robby

On Thu, Sep 23, 2010 at 8:19 AM, Deren Dohoda <deren.dohoda at gmail.com> wrote:
> It's interesting that (map apply ...) doesn't work, as this would have
> been the very first thing I tried (and probably the first thing you
> tried). You can pull it off with
>
> (map apply (list thunk thunk thunk)
>    (list empty empty empty))
>
> but that's hardly any better than the "thunk-apply" you created.
>
> Deren
>
> On Thu, Sep 23, 2010 at 8:35 AM, Tim Brown <tim.brown at cityc.co.uk> wrote:
>> Folks,
>>
>> Am I missing something really basic here?
>>
>> I have a list of thunks. I want to iterate over the results of these
>> using a high-order function ... map, for-each, filter (et al).
>>
>> The only way I can find to do it is:
>>
>> (map (lambda (x) (x))
>>  (list
>>    (lambda () 1)
>>    (lambda () 2)
>>    (lambda () 3))) -> '(1 2 3)
>>
>> Is there a standard name for the (lambda (x) (x)) in racket?
>>
>> Or do I have to write my own (define (call x) (x))?
>>
>> Tim
>>
>> --
>> Tim Brown <tim.brown at cityc.co.uk>  | City Computing Limited            |
>> T: +44 20 8770 2110                | City House, Sutton Park Road      |
>> F: +44 20 8770 2130                | Sutton, Surrey, SM1 2AE, GB       |
>> -----------------------------------------------------------------------|
>> BEAUTY:  What's in your eye when you have a bee in your hand           |
>> -----------------------------------------------------------------------'
>> City Computing Limited registered in London No. 1767817.
>> Registered Office: City House, Sutton Park Road, Sutton, Surrey, SM1 2AE
>> VAT number 372 8290 34.
>> _________________________________________________
>>  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.