Is there any reason why there is foldlM (foldM) and there is no foldrM?
I was confused because I didn't hit when I searched for this in pursuit.
foldrM :: forall a m b f. Foldable f => Monad m => (a -> b -> m b) -> b -> f a -> m b
foldrM f z0 xs = foldl c pure xs z0
where c k x z = f x z >>= k
Is there any reason why there is foldlM (foldM) and there is no foldrM?
I was confused because I didn't hit when I searched for this in pursuit.