I'm trying to get better at playing "type tetris". I have the functions:
(=<<) :: Monad m => (a -> m b) -> m a -> m b
zip :: [a] -> [b] -> [(a, b)]
And GHCi tells me:
(zip =<<) :: ([b] -> [a]) -> [b] -> [(a, b)]
I'm having a hard time figuring out how to arrive at that final signature from the first two. My intuition (for lack of a better word) is saying that the first argument of =<<
namely a -> mb
is somehow reconciled against the signature of zip
, and then it should all fall out from that. But I can't understand how to make that leap. Can it be broken down in to a series of easy to follow steps?