X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fearly-extensions.lisp;h=c36c1acf9faeba49ddb3dc7760e4498c86d8f164;hb=f0670f28705c01e79fb23cb2a582074d3e51ec98;hp=91b9d00f0b7132f1c99885333a5628f5317799b5;hpb=4ea1b7a6961e6b2d336603a04e448db052993244;p=sbcl.git diff --git a/src/code/early-extensions.lisp b/src/code/early-extensions.lisp index 91b9d00..c36c1ac 100644 --- a/src/code/early-extensions.lisp +++ b/src/code/early-extensions.lisp @@ -380,6 +380,14 @@ ;; a constant as long as the new value is EQL to the old ;; value.) )) + +;;; Return a function like FUN, but expecting its (two) arguments in +;;; the opposite order that FUN does. +(declaim (inline swapped-args-fun)) +(defun swapped-args-fun (fun) + (declare (type function fun)) + (lambda (x y) + (funcall fun y x))) ;;;; DEFPRINTER