RosettaCodeData/Task/Function-composition/Common-Lisp/function-composition-2.lisp
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

5 lines
144 B
Common Lisp

>(defun compose (f g) (lambda (x) (funcall f (funcall g x))))
COMPOSE
>(let ((sin-asin (compose #'sin #'asin))))
(funcall sin-asin 0.5))
0.5