Attaching nested monads

I use FRP.Sodium, and I have a type object IO (Behavior (IO (Behavior))). I need to convert this object to dial IO (Behavior)using something similar to nested join. Is it possible to use sodium functions? Is there a more general solution for a (b (a (b c))) -> a (b c))?

+4
source share
1 answer

There is no obvious way to do this. You can combine something with the right type, using functions such as sampleand sync, or updatesand executeSyncIO/executeAsyncIObut he probably does not obey the laws Monad.

a (b (a (b c))) -> a (b c)), , b Traversable, a (a (b (b c))) b.

+6

All Articles