
14 Oct
2019
14 Oct
'19
2:46 a.m.
Often you encounter functions that look weird at a first glance but turn out to be *exactly* what you need to implement something intuitively "more useful". Apart from Dmitrii's example showing some direct usage, I think this is such one case, as it allows you to implement (>>=) ma f = join (fmap f ma) 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. ======= Georgi