I understand that following will be:
[(+2),(+1)]<*>[1,2,3] == [3,4,5,2,3,4]
I also understand that fmap
is implemented as map
. But how could I mentally map this computation in my head? The first time I saw this I assumed the following:
[(*2),(+1)]<*>[1,2,3] == [4,5,6]
The second time around I though about: [[3,4,5],[2,3,4]]
. But on the other hand <*>
returns an f b
so I knew it wouldn't be possible. So my question is, what are the mental steps to make sense out of this?