summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-11-30 17:26:27 -0500
committerDavid Thompson <dthompson2@worcester.edu>2014-11-30 17:26:27 -0500
commit7458e703905502f9e969c8d46a3ab0b0b8d8f44c (patch)
tree1be1ff44f0a4a3fbe13f51d8aad604f2b66bcd47
parent5fc7589c863f06f1f71db8f9f9c5378c275c559d (diff)
signal: Rename signal-reject to signal-drop.
* sly/signal.scm (signal-reject): Delete. (signal-drop): New procedure.
-rw-r--r--sly/signal.scm22
1 files changed, 11 insertions, 11 deletions
diff --git a/sly/signal.scm b/sly/signal.scm
index b1209e8..8e150a2 100644
--- a/sly/signal.scm
+++ b/sly/signal.scm
@@ -42,7 +42,7 @@
signal-negate
signal-fold
signal-filter
- signal-reject
+ signal-drop
signal-drop-repeats
signal-switch
signal-constant
@@ -261,7 +261,7 @@ DEFAULT when the predicate is never satisfied."
(%signal-set! self value)))
(list signal)))
-(define (signal-reject predicate default signal)
+(define (signal-drop predicate default signal)
"Create a new signal that does not keep an incoming value from
SIGNAL when it satisfies the procedure PREDICATE. The value of the
signal is DEFAULT when the predicate is never satisfied."
@@ -271,15 +271,15 @@ signal is DEFAULT when the predicate is never satisfied."
"Create a new signal that filters out new values from SIGNAL that
are equivalent to the current value. By default, equal? is used for
testing equivalence."
- (signal-reject (let ((prev (signal-ref signal)))
- (lambda (current)
- (if (equal? prev current)
- #t
- (begin
- (set! prev current)
- #f))))
- (signal-ref signal)
- signal))
+ (signal-drop (let ((prev (signal-ref signal)))
+ (lambda (current)
+ (if (equal? prev current)
+ #t
+ (begin
+ (set! prev current)
+ #f))))
+ (signal-ref signal)
+ signal))
(define (signal-switch pred on off)
"Create a new signal whose value is that of the signal ON when the