
13 Dec
2015
13 Dec
'15
7:28 p.m.
On Mon, Dec 14, 2015 at 3:15 AM, martin
I started like this
data C a = C { insert :: a -> Maybe (C a), remove :: Maybe (a, C a) }
but I could not implement anything sensible on top of this.
And the reason you're stuck implementing anything sensible on top of this is because you've written an OOP-style specification of a data structure. You might want to review how Haskell declares data types. -- Kim-Ee