From 25759f0c506a35fd8450318bfc402f5dde3cc38f Mon Sep 17 00:00:00 2001 From: Attila Lendvai <attila.lendvai@gmail.com> Date: Sun, 16 Nov 2008 19:49:09 +0200 Subject: [PATCH] added ensure-functionf --- functions.lisp | 5 +++++ package.lisp | 1 + 2 files changed, 6 insertions(+) diff --git a/functions.lisp b/functions.lisp index 9e87e69..d8acb86 100644 --- a/functions.lisp +++ b/functions.lisp @@ -12,6 +12,11 @@ it must be a function name and its FDEFINITION is returned." function-designator (fdefinition function-designator))) +(define-modify-macro ensure-functionf/1 () ensure-function) + +(defmacro ensure-functionf (&rest places) + `(progn ,@(mapcar (lambda (x) `(ensure-functionf/1 ,x)) places))) + (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 diff --git a/package.lisp b/package.lisp index f86d417..20918e5 100644 --- a/package.lisp +++ b/package.lisp @@ -42,6 +42,7 @@ #:curry #:disjoin #:ensure-function + #:ensure-functionf #:multiple-value-compose #:named-lambda #:rcurry -- GitLab