Function: CURRY

Documentation

Returns a function which will call FUNCTION passing it INITIAL-ARGS and then any other args. (funcall (curry #'list 1) 2) ==> (list 1 2)

Source

(defun curry (function &rest initial-args)
  "Returns a function which will call FUNCTION passing it
  INITIAL-ARGS and then any other args.

 (funcall (curry #'list 1) 2) ==> (list 1 2)"
  (lambda (&rest args)
    (apply function (append initial-args args))))
Source Context