Skip to content

Commit

Permalink
Merge pull request #166 from mraveloarinjaka/pmap-full
Browse files Browse the repository at this point in the history
  • Loading branch information
bakpakin authored Jan 17, 2024
2 parents d644da0 + 289c791 commit 52d88ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spork/ev-utils.janet
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52d88ce

Please sign in to comment.