From d0f26aea4f87391af77f5911c3e2ae19891287c8 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 27 Feb 2016 14:13:32 -0500 Subject: signal: Add docstring for signal-if. * sly/signal.scm (signal-if): Add docstring. --- sly/signal.scm | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit v1.2.3