
19 Dec
2006
19 Dec
'06
11:35 p.m.
Neil Mitchell wrote:
Hi,
A weird question, what does the 1 element tuple look like?
() -- 0 element tuple (,) a b -- 2 element tuple (,,) a b c -- 3 element tuple
() a - meaningless (a) - a in brackets
GHC has the 1 element unboxed tuple, (# a #), and all the other sizes unboxed as well, but how would you visually represent the 1 element boxed tuple?
Tuples represent dimensionality therefore a 1-element tuple is just a 1-dimensional value ie the value itself hence a == (a) == ((a)) == (((a))) == ... Brian. -- http://www.metamilk.com