diff --git a/bang.el b/bang.el index 81c2350..9463198 100644 --- a/bang.el +++ b/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))))