They are just syntactic sugar. You can just as easily create your own tuple types: data Tuple2 a b = Tuple2 a b data Tuple3 a b c = Tuple3 a b c data Tuple4 a b c d = Tuple4 a b c d ..etc ...except it's pretty ugly and none of the built-in Prelude functions that use tuples will work with them (curry, uncurry, fst, snd, lookup, zip,..). Peter On 28 August 2012 02:47, Carlos J. G. Duarte <carlos.j.g.duarte@gmail.com> wrote:
Sorry if this question is too insane, but I was wondering if tuples are really needed in Haskell. I mean, could tuples be generally replaced by variables unroll (f x y z) and explicit data types, or are there some things only possible to do via tuples?
Thx in advance (and sorry if this looks silly).
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners