sedillard/Vec — pull request #3 by gmaslov (2012-11-26 20:42:32+00:00)
Title: Use (zipWith (*)) instead of (*) in 'dot'

I spent a few hours trying to figure out why my newtype Quaternions weren't working. It finally turned out that since I defined (*) in the Num class to be quaternion multiplication, not elementwise, 'dot' was now doing the wrong thing, causing 'norm' to fail, and so on, leading to my headache. This patch fixes that.

I realize that elementwise operations are "canonical" according to the README, but in my opinion they're just a necessary evil, and shouldn't be relied upon in the base library code. Users may be free to fall into temptation, or not, however they like :-)