embed package:dunai

Apply a monadic stream function to a list. Because the result is in a monad, it may be necessary to traverse the whole list to evaluate the value in the results to WHNF. For example, if the monad is the maybe monad, this may not produce anything if the MSF produces Nothing at any point, so the output stream cannot consumed progressively. To explore the output progressively, use arrM and (>>>)', together with some action that consumes/actuates on the output. This is called runSF in Liu, Cheng, Hudak, "Causal Commutative Arrows and Their Optimization"
Run an MSF fed from a list, discarding results. Useful when one needs to combine effects and streams (i.e., for testing purposes).