7 lines
148 B
Common Lisp
7 lines
148 B
Common Lisp
;; lexical-binding: t
|
|
(defun compose (f g)
|
|
(lambda (x)
|
|
(funcall f (funcall g x))))
|
|
|
|
(let ((func (compose '1+ '1+)))
|
|
(funcall func 5)) ;=> 7
|