diff options
-rw-r--r-- | sly/signal.scm | 3 |
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) |