aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-25 14:38:42 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-25 14:38:42 +0200
commit11e62a936c78c2147faeeb1c58f92ef275b75034 (patch)
tree76aca84228cf5a4e3cb3933ef0d3387f4bbfcc15
parentTerminal output end time now end time again. (diff)
downloadcalp-11e62a936c78c2147faeeb1c58f92ef275b75034.tar.gz
calp-11e62a936c78c2147faeeb1c58f92ef275b75034.tar.xz
Add stream-remove.
-rw-r--r--module/srfi/srfi-41/util.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/module/srfi/srfi-41/util.scm b/module/srfi/srfi-41/util.scm
index e2a26c45..dcd31973 100644
--- a/module/srfi/srfi-41/util.scm
+++ b/module/srfi/srfi-41/util.scm
@@ -69,6 +69,9 @@
((pred (stream-car stream)) (stream-car stream))
(else (stream-find pred (stream-cdr stream)))))
+(define-public (stream-remove pred stream)
+ (stream-filter (negate pred) stream))
+
;; Evaluates @var{body} in a context where most list fundamentals are
;; replaced by stream alternatives.
;; commented defifinitions are items which could be included, but for