aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/control/concurrency/frp.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/library/lux/control/concurrency/frp.lux26
1 files changed, 13 insertions, 13 deletions
diff --git a/stdlib/source/library/lux/control/concurrency/frp.lux b/stdlib/source/library/lux/control/concurrency/frp.lux
index 36275bef4..c1b7c9931 100644
--- a/stdlib/source/library/lux/control/concurrency/frp.lux
+++ b/stdlib/source/library/lux/control/concurrency/frp.lux
@@ -105,7 +105,7 @@
(do async.monad
[item_f ff
item_a fa]
- (case [item_f item_a]
+ (when [item_f item_a]
[{.#Some [head_f tail_f]} {.#Some [head_a tail_a]}]
(in {.#Some [(head_f head_a)
(on tail_a tail_f)]})
@@ -136,13 +136,13 @@
(loop (again [mma mma])
(do [! async.monad]
[?mma mma]
- (case ?mma
+ (when ?mma
{.#Some [ma mma']}
(do !
[_ (loop (again [ma ma])
(do !
[?ma ma]
- (case ?ma
+ (when ?ma
{.#Some [a ma']}
(exec
(io.run! (at sink feed a))
@@ -169,9 +169,9 @@
it)])
(do async.monad
[item it]
- (case item
+ (when item
{.#Some [head tail]}
- (case (io.run! (subscriber head))
+ (when (io.run! (subscriber head))
{.#Some _}
(again tail)
@@ -186,7 +186,7 @@
(All (_ a) (-> (-> a Bit) (Channel a) (Channel a)))
(do async.monad
[item it]
- (case item
+ (when item
{.#Some [head tail]}
(let [tail' (only pass? tail)]
(if (pass? head)
@@ -208,7 +208,7 @@
(Async a)))
(do [! async.monad]
[item it]
- (case item
+ (when item
{.#None}
(in init)
@@ -226,7 +226,7 @@
[init]
(do [! async.monad]
[item it]
- (case item
+ (when item
{.#None}
(in {.#None})
@@ -255,7 +255,7 @@
(All (_ s o) (-> (-> s (Async (Maybe [s o]))) s (Channel o)))
(do async.monad
[?next (f init)]
- (in (case ?next
+ (in (when ?next
{.#Some [state output]}
{.#Some [output (iterations f state)]}
@@ -266,7 +266,7 @@
(All (_ a) (-> (Equivalence a) a (Channel a) (Channel a)))
(do async.monad
[item it]
- (case item
+ (when item
{.#Some [head tail]}
(if (at equivalence = previous head)
(distinct' equivalence previous tail)
@@ -279,7 +279,7 @@
(All (_ a) (-> (Equivalence a) (Channel a) (Channel a)))
(do async.monad
[item it]
- (in (case item
+ (in (when item
{.#Some [head tail]}
{.#Some [head (distinct' equivalence head tail)]}
@@ -290,7 +290,7 @@
(All (_ a) (-> (Channel a) (Async (List a))))
(do [! async.monad]
[item it]
- (case item
+ (when item
{.#Some [head tail]}
(at ! each (|>> {.#Item head})
(list tail))
@@ -300,7 +300,7 @@
(def .public (sequential milli_seconds values)
(All (_ a) (-> Nat (List a) (Channel a)))
- (case values
+ (when values
{.#End}
..empty