On Jun 19, 2009, at 11:23 PM, Eduardo Cavazos wrote:

Does that have a name in wide use? It can be used it to map over a bunch of procedures, calling each with 'x'. I.e.:

(define (arg x)
  (lambda (f)
    (f x)))

(map (arg pi) (list sin cos tan))

Just curious if the idiom has a name.

It appears to be called "Thrush"[*] (a.k.a. the Cardinal Idiot):

(define I (lambda (x) x))
(define C (lambda (x) (lambda (y) (lambda (z) ((x z) y)))))
(map ((C I) pi) (list sin cos tan))

It doesn't sound common though.

Aziz,,,

[*] http://www.angelfire.com/tx4/cus/combinator/birds.html

Reply via email to