7 Mar
2007
7 Mar
'07
1:13 a.m.
Usually, I can do this, but today, my brain is weak, and I'm just trying to get this piece of code out the door. My code looks like this: weight = sum (IntMap.elems (IntMap.intersectionWith (\x y -> x*y) queryVector rationalProjection)) I know that this will work (ignoring indentation): sum $ IntMap.elems $ IntMap.intersectionWith (\x y -> x*y) queryVector rationalProjection But why won't this?: sum . IntMap.elems . IntMap.IntersectionWith ... Is there a difference between the "elegance" of function composition versus application?