summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2016-02-27 14:13:32 -0500
committerDavid Thompson <dthompson2@worcester.edu>2016-02-27 14:13:32 -0500
commitd0f26aea4f87391af77f5911c3e2ae19891287c8 (patch)
tree9ec1bda8f5b99b2029e1f094494d14aff6996750
parent0962cfa1a3567218980dd29d3a47234535722894 (diff)
signal: Add docstring for signal-if.
* sly/signal.scm (signal-if): Add docstring.
-rw-r--r--sly/signal.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/sly/signal.scm b/sly/signal.scm
index 41365a9..fc58b25 100644
--- a/sly/signal.scm
+++ b/sly/signal.scm
@@ -354,6 +354,9 @@ signal PRED is true, or the value of the signal OFF otherwise."
(list predicate)))
(define-syntax-rule (signal-if predicate consequent alternate)
+ "Create a new signal whose value is the result of evaluating
+CONSEQUENT when the value of the signal PREDICATE is truth, otherwise
+ALTERNATE is evaluated."
(signal-map (lambda (true?) (if true? consequent alternate)) predicate))
(define (signal-constant constant signal)