[Haskell-cafe] Simple matrix
atilaromero at yahoo.com.br
Wed Jun 21 13:40:22 EDT 2006
And there is another problem: one could expect
10 * [[1,2],[3,4]] to be equal to [[10,20],[30,40]]
and in this case 10 should be equal to [[10,0],[0,10]], instead of
[[10,10],[10,10]] or [].
I dont see how to fix this.
Could be better to forget about fromInteger...
Jared Updike wrote:
>> fromInteger x = [[fromInteger x]]
> Wouldn't you want the expression
> [[1,0],[0,2]] + 10
> to yield
> instead of [] ? I guess you would need some complicated machinery
> so this is one thing you have to ignore to keep your otherwise nifty
> instance nice and simple.
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular. Registre seu aparelho agora!
More information about the Haskell-Cafe