leonoel / missionary

A functional effect and streaming system for Clojure/Script
Eclipse Public License 2.0
620 stars 25 forks source link

zip doesn't terminate properly #74

Closed leonoel closed 2 months ago

leonoel commented 1 year ago

(m/zip vector (m/seed [1 2 3]) (m/seed (repeat nil))) goes into an infinite loop when 3 gets consumed.

xificurC commented 1 year ago

(m/? (m/reduce conj (interleave (m/seed [0 0 0]) (m/seed (range 99999999))))) takes 3 seconds to finish, suggesting m/zip eagerly consumes its upstream flows, but produces the correct answer.

xificurC commented 1 year ago

I believe I captured the essence here

https://github.com/leonoel/missionary/commit/595ca7b412ccff1f09b539a356f9e23ef730bc6d

leonoel commented 2 months ago

Fixed in b.39