I have question about vector package.
Currently I'm playing with data types which are isomorphic to vectors of fixed
length. Think about vector in N-dimensional space, list of parameters to
function R^n â R, set of measurements with uncertainties, etc. They have
different semantics but exactly the same representation and it's often
advantageous to think about them as N-dimensional vectors.
Then constructor like one below arise naturally. And I don't know how to write
them properly. It's possible to use fromList but then list could be allocated
which is obviously wasteful.
> vector2 :: Double -> Double -> Vec2D
> vector2 x y = ...
> -- Vec2D is some wrapper around Vector data type
Another question is there any specific problems with short vectors? They could
be just 2 elements long. I mean performance problems
Haskell-Cafe mailing list