From 11e62a936c78c2147faeeb1c58f92ef275b75034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sat, 25 Apr 2020 14:38:42 +0200 Subject: Add stream-remove. --- module/srfi/srfi-41/util.scm | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3