hiding import, tuple instances

Ashley Yakeley ashley@semantic.org
Fri, 31 Aug 2001 23:00:17 -0700


At 2001-08-31 13:59, I wrote:

>At 2001-08-31 09:27, Marcin 'Qrczak' Kowalczyk wrote:
>
>>> How do I define functions that work on all tuples?
>>
>>You can't, and this is unfortunate.
>
>You can make your own 'tuples' using cons = (,) and nil = (). Then you 
>can use multi-parameter classes to manipulate them.

See, for instance, 
<http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/truth-framework/Source/Type
Calc/ListType.hs?rev=HEAD&content-type=text/vnd.viewcvs-markup>

ListType> concatenate ('p',(3,(False,()))) ("Hello",(7,()))
('p',(3,(False,("Hello",(7,())))))


-- 
Ashley Yakeley, Seattle WA