I am currently trying to solve the 20 Intermediate Haskell Excercises excercises and am stuck which trying to implement mapM
(which is moppy
in the excercise) without the use of sequence
.
All I can produce is a [m b]
by simply applying fmap
but I don't know how to continue:
moppy :: [a] -> (a -> m b) -> m [b]
moppy la f = furry' f la -- how do I transform [m b] to m [b] without sequence
Can someone give me a hint in which direction to look?