From 655212e006be6ee865a810dfa0259367f309e17c Mon Sep 17 00:00:00 2001 From: "Tobias C. Rittweiler" <tcr@freebits.de> Date: Sun, 1 Jun 2008 12:01:11 +0300 Subject: [PATCH] alexandria-functions-really-shutup-notes.diff --- functions.lisp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/functions.lisp b/functions.lisp index 0b3f47c..9e87e69 100644 --- a/functions.lisp +++ b/functions.lisp @@ -2,6 +2,16 @@ (declaim (inline ensure-function)) ; to propagate return type. +(declaim (ftype (function (t) (values function &optional)) + ensure-function)) +(defun ensure-function (function-designator) + "Returns the function designated by FUNCTION-DESIGNATOR: +if FUNCTION-DESIGNATOR is a function, it is returned, otherwise +it must be a function name and its FDEFINITION is returned." + (if (functionp function-designator) + function-designator + (fdefinition function-designator))) + (defun disjoin (predicate &rest more-predicates) "Returns a function that applies each of PREDICATE and MORE-PREDICATE functions in turn to its arguments, returning the primary value of the first @@ -120,14 +130,4 @@ with and ARGUMENTS to FUNCTION." "Expands into a lambda-expression within whose BODY NAME denotes the corresponding function." `(labels ((,name ,lambda-list ,@body)) - #',name)) - -(declaim (ftype (function (t) (values function &optional)) - ensure-function)) -(defun ensure-function (function-designator) - "Returns the function designated by FUNCTION-DESIGNATOR: -if FUNCTION-DESIGNATOR is a function, it is returned, otherwise -it must be a function name and its FDEFINITION is returned." - (if (functionp function-designator) - function-designator - (fdefinition function-designator))) \ No newline at end of file + #',name)) \ No newline at end of file -- GitLab