missionary

Ian Chow 2025-07-14T03:48:51.259379Z

hi, i'm using an m/mbx as a queue. which of the below is idiomatic for converting an mbx to a flow?

;1
(m/ap
   (loop []
     (m/amb (m/? mbx)
            (recur))))
or
;2
(m/ap (m/? (m/?> (m/seed (repeat mbx)))))
why doesn't this work?-
;3
(m/ap
   (while true
     (m/amb (m/? mbx))))

leonoel 2025-07-14T07:32:29.622549Z

1 and 2 are semantically equivalent, I don't have an opinion about the most idiomatic 3 is essentially (loop [] (m/? mbx) (recur)) which discards the result of the task and never breaks from the loop

💡 1