
6 Feb
2006
6 Feb
'06
7:49 p.m.
A much bigger problem is that treating n-tuples as nested 2-tuples doesn't actually let you treat them generically, which was the point of the proposed transformation. imagine you want to replace all the values in an n-tuple with zero, what type would it have? zero_out :: (Int,?) -> (Int,?) there is nothing you can put there which will let zero_out work on arbitrarily deep tuples, its recursive call will always need to be called on something of the appropriate type which means the nesting depth needs to be specified in the type signature. You can do something with classes, but then you might as well just use the class for general n-tuples. John -- John Meacham - ⑆repetae.net⑆john⑈