From d81c3a147543e0440c9efa547dc1a7904ea30a8c Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 2 Nov 2019 18:45:31 -0700 Subject: add some clojure-inspired scheme functions --- Com/Simatime/core.scm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Com') 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 (()))) -- cgit v1.2.3