I understand that the following will be:
[(+2),(+1)]<*>[1,2,3] == [3,4,5,2,3,4]
I also understand what fmapis being implemented as map. But how could I mentally contrast this calculation in my head? The first time I saw this, I suggested the following:
[(*2),(+1)]<*>[1,2,3] == [4,5,6]
The second time, though I'm talking about him [[3,4,5],[2,3,4]]. But on the other hand , it <*>returns f b, so I knew that it would be impossible. So my question is: what are the mental steps to understand this?
source
share