<p dir="ltr">'insert' is a record accessor, so there is an implied (C a).</p>
<p dir="ltr">Cheers,<br>
D<br>
</p>
<div class="gmail_quote">On Dec 15, 2015 00:02, "Carlo Hamalainen" <<a href="mailto:carlo@carlo-hamalainen.net">carlo@carlo-hamalainen.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 15/12/2015 15:33, Joachim Durchholz wrote:<br>
> I see Kim-Ee Yeoh stating that Martin is stuck without a way forward<br>
> due to using OO style, which seems more serious than just "wordy and<br>
> unnatural".<br>
> Or am I misreading his words, and that "OO-style" reference was just<br>
> descriptive rather than presenting the base cause of Martin's problems?<br>
<br>
The OP originally wrote an insert function with this type:<br>
<br>
insert :: a -> Maybe (C a)<br>
<br>
which sort of looks like an insert function from an OO language where<br>
the self object is implicit. In functional style it should be<br>
<br>
insert :: a -> C a -> Maybe (C a)<br>
<br>
Another way: it's impossible to implement<br>
<br>
insert :: a -> Maybe (C a)<br>
insert a = ???<br>
<br>
because there is no 'C a' to modify.<br>
<br>
--<br>
Carlo Hamalainen<br>
<a href="http://carlo-hamalainen.net" rel="noreferrer" target="_blank">http://carlo-hamalainen.net</a><br>
<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div>