diff options
author | Eduardo Julian | 2018-12-15 23:57:38 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-12-15 23:57:38 -0400 |
commit | 8b2964eaaaa729edb00279cdff293ce3c39bd1cd (patch) | |
tree | 7514fff3a9386fae508959596e6a2641a409fa8b /stdlib/source/lux/control/concurrency/stm.lux | |
parent | 43cca9e6b4f25a0a731ba4262e1ee7fae0c6dab7 (diff) |
Reverted "lux/control/concurrency/frp" to the previous style of doing FRP.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/control/concurrency/stm.lux | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/stdlib/source/lux/control/concurrency/stm.lux b/stdlib/source/lux/control/concurrency/stm.lux index f54e16baf..31a62413e 100644 --- a/stdlib/source/lux/control/concurrency/stm.lux +++ b/stdlib/source/lux/control/concurrency/stm.lux @@ -52,18 +52,14 @@ (wrap [])) (write! new-value (:abstraction var))))) - ## TODO: Remove when possible - (def: (helper|follow var) - (All [a] (-> (Var a) (frp.Channel a))) - (frp.channel [])) (def: #export (follow target) {#.doc "Creates a channel that will receive all changes to the value of the given var."} (All [a] (-> (Var a) (IO (frp.Channel a)))) (do io.Monad<IO> - [#let [channel (helper|follow target) + [#let [[channel source] (frp.channel []) target (:representation target)] _ (atom.update (function (_ [value observers]) - [value (#.Cons (frp.publish channel) observers)]) + [value (#.Cons (frp.feed source) observers)]) target)] (wrap channel))) ) |