Function: apply-partially

apply-partially is a byte-compiled function defined in subr.el.gz.

Signature

(apply-partially FUN &rest ARGS)

Documentation

Return a function that is a partial application of FUN to ARGS.

ARGS is a list of the first N arguments to pass to FUN. The result is a new function which does the same as FUN, except that the first N arguments are fixed at the values with which this function was called.

View in manual

Probably introduced at or before Emacs version 23.1.

Aliases

-partial

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun apply-partially (fun &rest args)
  "Return a function that is a partial application of FUN to ARGS.
ARGS is a list of the first N arguments to pass to FUN.
The result is a new function which does the same as FUN, except that
the first N arguments are fixed at the values with which this function
was called."
  (declare (side-effect-free error-free))
  (lambda (&rest args2)
    (apply fun (append args args2))))