* Olex P <hoknam...@gmail.com> [2009-01-24 15:35:22+0000] > But you know it doesn't make too much sense because I also have to define > addition Scalar + Vector (that means construct vector from scalar and add a > vector), Vector + Scalar and so on. And as we are not able to overload > operations in C++ like way we have to create several different operations > even if their meaning is pretty close. Probably it's possible with ad hoc > overloading but I don't know is it good idea.
Consider defining functions with meaningful names (like scalarPlusVector), you then can use them as infix operators: 5 `scalarPlusVector` Vector 1 2 3 -- Roman I. Cheplyaka :: http://ro-che.info/ "Don't let school get in the way of your education." - Mark Twain _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe