summaryrefslogtreecommitdiff
path: root/2d
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-02-17 16:59:53 -0500
committerDavid Thompson <dthompson2@worcester.edu>2014-02-17 16:59:53 -0500
commitbcdb46d042caa462c0c350af3be0a7b98a8d3344 (patch)
tree987c5fef63da9c7a1e403194fad04df19d6899dc /2d
parent64a8ffc4b81048e070b2747e376d2fc5a5b0a31b (diff)
Add inputs field to <signal>.
* 2d/signal (<signal>): Add inputs field. (%make-signal): Add inputs parameter.
Diffstat (limited to '2d')
-rw-r--r--2d/signal.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/2d/signal.scm b/2d/signal.scm
index ec971b0..fc1ce31 100644
--- a/2d/signal.scm
+++ b/2d/signal.scm
@@ -56,10 +56,11 @@
;; programming. State mutation is hidden away and a functional,
;; declarative interface is exposed.
(define-record-type <signal>
- (%%make-signal value proc outputs)
+ (%%make-signal value proc inputs outputs)
signal?
(value %signal-ref %%signal-set!)
(proc signal-proc)
+ (inputs signal-inputs)
(outputs signal-outputs))
(define-record-type <signal-box>
@@ -69,7 +70,7 @@
(define (%make-signal init proc inputs)
"Create a new signal with initial value INIT."
- (let ((signal (%%make-signal init proc (make-weak-key-hash-table))))
+ (let ((signal (%%make-signal init proc inputs (make-weak-key-hash-table))))
(for-each (cut signal-connect! signal <>) inputs)
signal))