[Haskell-cafe] One thought: Num to 0 as ? to list?

Marc Weber marco-oweber at gmx.de
Sun Aug 13 14:36:39 EDT 2006

Is there somethinig corresponding to Num concering lists?

I mean there is + - /.. defined. + - are not type specific (Int, Double)
neither is : [1,2] notation to Elements.. But   what  about different
implementatins of lists? (linked lists? hash lists? array with index?

In other words: why not overload (:) ?

Then it would be possible to use "blah" for fast packed strings, too

Then you could also implement implementations for C arrays and access
them. (Sure you can do it anyway but not using syntactic sugar)

One part of the answer is patterns?
f 'a' = ..
f _ = ..


More information about the Haskell-Cafe mailing list