From 7458e703905502f9e969c8d46a3ab0b0b8d8f44c Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 30 Nov 2014 17:26:27 -0500 Subject: signal: Rename signal-reject to signal-drop. * sly/signal.scm (signal-reject): Delete. (signal-drop): New procedure. --- sly/signal.scm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'sly/signal.scm') 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 -- cgit v1.2.3