summaryrefslogtreecommitdiff
path: root/Com
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-11-02 18:45:31 -0700
committerBen Sima <ben@bsima.me>2019-11-02 18:45:31 -0700
commitd81c3a147543e0440c9efa547dc1a7904ea30a8c (patch)
tree6f0129ce3508d72df741601dc7e14e9d8228d497 /Com
parentcaecb53ded78d137e594c36e7c9e0d9814ce3349 (diff)
add some clojure-inspired scheme functions
Diffstat (limited to 'Com')
-rw-r--r--Com/Simatime/core.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/Com/Simatime/core.scm b/Com/Simatime/core.scm
index dbacd8a..4d523ea 100644
--- a/Com/Simatime/core.scm
+++ b/Com/Simatime/core.scm
@@ -79,6 +79,15 @@
(define (nil? x)
(eq? nil x))
+(define (some pred coll)
+ (or (pred (first coll))
+ (some pred (next coll))))
+
+(define comp compose)
+
+(define (not-any? pred coll)
+ (comp not some))
+
(define-syntax when-not
(syntax-case
(())))