aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Okay <cbeok@protonmail.com>2020-08-13 09:44:17 -0500
committerColin Okay <cbeok@protonmail.com>2020-08-13 09:44:17 -0500
commit76ce9621e57a51c4dff7f89f86bf32c105780de7 (patch)
tree53e1c2d32ae397d6f7153467a9596b35b9ccfb20
parent6f7197cccbc81924f314d63b6be5fe166f0c98cf (diff)
tweaks and fixes, an a kind of threading/composition function pair
-rw-r--r--lambda-tools.lisp11
-rw-r--r--package.lisp4
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
+ #:>>
+ #:<>))