diff --git a/spork/ev-utils.janet b/spork/ev-utils.janet index 470b53e..722e20d 100644 --- a/spork/ev-utils.janet +++ b/spork/ev-utils.janet @@ -82,8 +82,9 @@ (def chan (ev/chan)) (def res (if (dictionary? data) @{} @[])) (join chan - (seq [[i x] :pairs data] - (ev/go (fiber/new (fn [] (put res i (f x))) :tp) nil chan))) + (tabseq [[i x] :pairs data + :let [fib (ev/go (fiber/new (fn [] (put res i (f x))) :tp) nil chan)]] + fib fib)) res) (defn pmap-limited