From 1c9c78d917d86632c176084352bbe90698a6c5da Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Sun, 13 Dec 2020 11:01:10 -0600 Subject: monadic> --- functions.lisp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'functions.lisp') diff --git a/functions.lisp b/functions.lisp index 3c06f79..8296f87 100644 --- a/functions.lisp +++ b/functions.lisp @@ -7,7 +7,7 @@ (setf arg (funcall fn arg)))) (defun all> (arg &rest preds) - "Predicate Filter. Returns ARG if (PRED ARG) is non-NIL for each + "Predicate Filter. Returns ARG if (PRED ARG) is non-NIL for every PRED in PREDS" (dolist (pred preds arg) (unless (funcall pred arg) @@ -15,6 +15,8 @@ PRED in PREDS" (defun some> (arg &rest preds) + "Predicate filter. Returns ARG if (PRED ARG) is non-NIL for any PRED +in PREDS." (dolist (pred preds nil) (when (funcall pred arg) (return-from some> arg)))) -- cgit v1.2.3