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 <[email protected]> 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 <[email protected]> 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 <[email protected]> | 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 > _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

