zipWith calls this function in pairs in each member of both lists. Therefore, zipWith f [a,b,c] [x,y,z] is evaluated as [fax, fby, fcz] . In this case, f is zipWith (*) , and the list items are again lists, so you get:
[ zipWith (*) [1,2,3] [3,2,2], zipWith (*) [3,5,6] [3,4,5], zipWith (*) [2,3,4] [5,4,3] ]
Now zipWith internal calls replenish the elements of internal lists in pairs, so you get:
[ [3,4,6], [9,20,30], [10,12,12] ]
source share