RosettaCodeData/Task/Function-composition/NewLISP/function-composition.l

5 lines
147 B
Common Lisp

> (define (compose f g) (expand (lambda (x) (f (g x))) 'f 'g))
(lambda (f g) (expand (lambda (x) (f (g x))) 'f 'g))
> ((compose sin asin) 0.5)
0.5