Jefferson Heard <jeff@renci.org> wrote on 03/06/2007 03:18:40 PM:

> Nope, I'm asking why
>
> um . IntMap.elems . IntMap.IntersectionWith (\x y -> x*y) queryVector
> rationalProjection
>
> won't work.
>

We have (simplifying away some typeclass details):
 
    sum . elems :: IntMap a -> a

and:

    intersectionWith (*) :: IntMap a -> IntMap a -> IntMap a

but:

    ((sum . elems) .) :: (IntMap a -> IntMap a) -> IntMap a -> a

so you need something like:

    sum . elems . uncurry (intersectionWith (*)) $ (queryVector, rationalProjection)

-Jeff

---

This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorized copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.