
14 Oct
2019
14 Oct
'19
2:58 a.m.
On Mon, 14 Oct 2019, Georgi Lyubenov wrote:
Other examples (subjectively of course) of such things are (<*>) which allows you to implement liftA{2,3,..} and mfix, which allows you to have recursive bindings in a do block.
Other example: We have liftM2 :: (a -> b -> c) -> m a -> m b -> m c but what can we do, if we need: liftM2' :: (a -> b -> m c) -> m a -> m b -> m c ? We could just do: join $ liftM2 f ma mb