
4 Jun
2009
4 Jun
'09
10:53 p.m.
Günther Schmidt wrote:
data Container a = Single a | Many a [a]
but the problem above is that the data structure would allow to construct a Many 5 [] :: Container Int.
I think you meant to do either data Container a = Single a | Many a (Container a) or data Container a = Container a [a] - Jake