<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 14, 2015 at 3:15 AM, martin <span dir="ltr"><<a href="mailto:martin.drautzburg@web.de" target="_blank">martin.drautzburg@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1st" class="a3s" style="overflow:hidden">
I started like this<br>
<br>
data C a = C {<br>
            insert :: a -> Maybe (C a),<br>
            remove :: Maybe (a, C a)<br>
        }<br>
<br>
but I could not implement anything sensible on top of this.</div></blockquote></div><br></div><div class="gmail_extra">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.<br><br></div><div class="gmail_extra">You might want to review how Haskell declares data types.<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">-- Kim-Ee</div></div>
</div></div>