diff options
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/source/lux/concurrency/session.lux | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/lux/concurrency/session.lux b/stdlib/source/lux/concurrency/session.lux index ea0f3666f..ac9f984d9 100644 --- a/stdlib/source/lux/concurrency/session.lux +++ b/stdlib/source/lux/concurrency/session.lux @@ -84,8 +84,8 @@ (All [value mine yours] (-> (Lazy [mine yours]) (Lazy [(Read value mine) (Write value yours)]))) - (let [channel (promise.promise #.None)] - (lazy.freeze [(function (_ _) + (lazy.freeze (let [channel (promise.promise #.None)] + [(function (_ _) (let [[mine yours] (lazy.thaw session)] (do promise.Monad<Promise> [value channel] @@ -100,8 +100,8 @@ (All [value mine yours] (-> (Lazy [mine yours]) (Lazy [(Write value mine) (Read value yours)]))) - (let [channel (promise.promise #.None)] - (lazy.freeze [(function (_ value) + (lazy.freeze (let [channel (promise.promise #.None)] + [(function (_ value) (let [[mine yours] (lazy.thaw session)] (exec (io.run (promise.resolve value channel)) (promise.promise (#.Some mine))))) @@ -142,9 +142,9 @@ (All [myL yourL myR yourR] (-> (Lazy [myL yourL]) (Lazy [myR yourR]) (Lazy [(Fork myL myR) (Join yourL yourR)]))) - (let [channel (: (Promise Bit) - (promise.promise #.None))] - (lazy.freeze [(function (_ signal) + (lazy.freeze (let [channel (: (Promise Bit) + (promise.promise #.None))] + [(function (_ signal) (let [[myL yourL] (lazy.thaw left) [myR yourR] (lazy.thaw right)] (case signal @@ -169,9 +169,9 @@ (All [myL yourL myR yourR] (-> (Lazy [myL yourL]) (Lazy [myR yourR]) (Lazy [(Join myL myR) (Fork yourL yourR)]))) - (let [channel (: (Promise Bit) - (promise.promise #.None))] - (lazy.freeze [(function (_ _) + (lazy.freeze (let [channel (: (Promise Bit) + (promise.promise #.None))] + [(function (_ _) (let [[myL yourL] (lazy.thaw left) [myR yourR] (lazy.thaw right)] (do promise.Monad<Promise> |