From 76ce9621e57a51c4dff7f89f86bf32c105780de7 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Thu, 13 Aug 2020 09:44:17 -0500 Subject: tweaks and fixes, an a kind of threading/composition function pair --- lambda-tools.lisp | 11 +++++++++++ package.lisp | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lambda-tools.lisp b/lambda-tools.lisp index ecad381..24e3cb2 100644 --- a/lambda-tools.lisp +++ b/lambda-tools.lisp @@ -38,3 +38,14 @@ the preceding predicates in the list returned non-NIL." ((funcall (car preds) x) (conj x (cdr preds)))))) (lambda (x) (conj x predicates)))) + +(defun >> (arg &rest fns) + (dolist (fn fns) + (setf arg (funcall fn arg))) + arg) + + +(defun <> (&rest fns) + (lambda (arg) + (apply #'>> arg fns))) + diff --git a/package.lisp b/package.lisp index d6a307d..35c5f5f 100644 --- a/package.lisp +++ b/package.lisp @@ -4,4 +4,6 @@ (:use #:cl) (:export #:$$ #:$and - #:$or)) + #:$or + #:>> + #:<>)) -- cgit v1.2.3