summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sly/signal.scm12
1 files changed, 5 insertions, 7 deletions
diff --git a/sly/signal.scm b/sly/signal.scm
index c1f16e7..3f5972f 100644
--- a/sly/signal.scm
+++ b/sly/signal.scm
@@ -299,13 +299,11 @@ SIGNAL. PROC is applied with the current value of SIGNAL and the
previously computed value, or INIT for the first call."
(let ((inputs (cons signal rest)))
(make-boxed-signal init
- (let ((previous init))
- (lambda (self value)
- (let ((x (apply proc
- (append (map signal-ref inputs)
- (list previous)))))
- (set! previous x)
- (%signal-set! self x))))
+ (lambda (self value)
+ (let ((x (apply proc
+ (append (map signal-ref inputs)
+ (list (%signal-ref self))))))
+ (%signal-set! self x)))
inputs)))
(define (signal-filter predicate default signal)