
23 Apr
2008
23 Apr
'08
11:46 p.m.
2008/4/23 Martijn Schrage
It depends a bit on what you want to use these lists for, but the following encoding works for your examples and doesn't need the type class.
data E data O
type Even = (E,O) type Odd = (O,E)
That's a nice little trick! I like how you achieve type signatures relating two distinct types just by sticking them in a tuple. :) David