Add note about !rpartial only working on Emacs 24+

master
Magnar Sveen 14 years ago
parent 047eeea939
commit 5bd4593d77
  1. 7
      bang.el

@ -143,14 +143,15 @@ Thus function FN should return a collection."
and returns a fn that takes a variable number of additional ARGS.
When called, the returned function calls FN with ARGS first and
then additional args."
`(closure (t) (&rest args)
(apply ',fn ,@(mapcar (lambda (arg) `',arg) args) args)))
(apply 'apply-partially fn args))
(defun !rpartial (fn &rest args)
"Takes a function FN and fewer than the normal arguments to FN,
and returns a fn that takes a variable number of additional ARGS.
When called, the returned function calls FN with the additional
args first and then ARGS."
args first and then ARGS.
Requires Emacs 24 or higher."
`(closure (t) (&rest args)
(apply ',fn (append args ',args))))

Loading…
Cancel
Save