diff options
author | Colin Okay <cbeok@protonmail.com> | 2020-08-13 09:44:17 -0500 |
---|---|---|
committer | Colin Okay <cbeok@protonmail.com> | 2020-08-13 09:44:17 -0500 |
commit | 76ce9621e57a51c4dff7f89f86bf32c105780de7 (patch) | |
tree | 53e1c2d32ae397d6f7153467a9596b35b9ccfb20 | |
parent | 6f7197cccbc81924f314d63b6be5fe166f0c98cf (diff) |
tweaks and fixes, an a kind of threading/composition function pair
-rw-r--r-- | lambda-tools.lisp | 11 | ||||
-rw-r--r-- | package.lisp | 4 |
2 files changed, 14 insertions, 1 deletions
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 + #:>> + #:<>)) |