Function: -flip
-flip is a byte-compiled function defined in dash.el.
Signature
(-flip FN)
Documentation
Return a function that calls FN with its arguments reversed.
The returned function takes the same number of arguments as FN.
For example, the following two expressions are morally equivalent:
(funcall (-flip #'-) 1 2) = (- 2 1)
See also: -rotate-args.
Source Code
;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -flip (fn)
"Return a function that calls FN with its arguments reversed.
The returned function takes the same number of arguments as FN.
For example, the following two expressions are morally
equivalent:
(funcall (-flip #\\='-) 1 2) = (- 2 1)
See also: `-rotate-args'."
(declare (pure t) (side-effect-free error-free))
(lambda (&rest args) ;; Open-code for speed.
(cond ((cddr args) (apply fn (nreverse args)))
((cdr args) (funcall fn (cadr args) (car args)))
(args (funcall fn (car args)))
((funcall fn)))))