X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ffunutils.lisp;h=00ecb67b943c726017039e7e234439d10e6c81e0;hb=82cd148d729c241e79c8df04b700beec1b7c55de;hp=ab85f44510124b41f69be5aec084c5fd571ce00e;hpb=4f7211e1d005696dcd29d8322fa531992ea8fed4;p=sbcl.git diff --git a/src/code/funutils.lisp b/src/code/funutils.lisp index ab85f44..00ecb67 100644 --- a/src/code/funutils.lisp +++ b/src/code/funutils.lisp @@ -22,20 +22,17 @@ "Return a new function that returns T whenever FUNCTION returns NIL and NIL whenever FUNCTION returns non-NIL." (lambda (&optional (arg0 nil arg0-p) (arg1 nil arg1-p) (arg2 nil arg2-p) - &rest more-args) + &rest more-args) (not (cond (more-args (apply function arg0 arg1 arg2 more-args)) - (arg2-p (funcall function arg0 arg1 arg2)) - (arg1-p (funcall function arg0 arg1)) - (arg0-p (funcall function arg0)) - (t (funcall function)))))) + (arg2-p (funcall function arg0 arg1 arg2)) + (arg1-p (funcall function arg0 arg1)) + (arg0-p (funcall function arg0)) + (t (funcall function)))))) (defun constantly (value) #!+sb-doc "Return a function that always returns VALUE." - (lambda () - ;; KLUDGE: This declaration is a hack to make the closure ignore - ;; all its arguments without consing a &REST list or anything. - ;; Perhaps once DYNAMIC-EXTENT is implemented we won't need to - ;; screw around with this kind of thing. -- WHN 2001-04-06 - (declare (optimize (speed 3) (safety 0))) + (lambda (&rest arguments) + (declare (ignore arguments)) + (declare (optimize (speed 3) (safety 0) (debug 0))) value))