2008-02-20から1日間の記事一覧

On Lisp復習

5.4 関数を合成する CL-USER 1 > (defun compose (&rest fns) (if fns (let ((fn1 (car (last fns))) (rest (butlast fns)) ) #'(lambda (&rest args) (reduce #'funcall rest :from-end t :initial-value (apply fn1 args) ))) #'identity)) COMPOSE CL-USE…