<br><div class="gmail_quote">On Jan 3, 2008 6:08 AM, Achim Schneider &lt;<a href="mailto:barsoap@web.de">barsoap@web.de</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Achim Schneider &lt;<a href="mailto:barsoap@web.de">barsoap@web.de</a>&gt; wrote:<br><br>&gt; [...]<br><br>I&#39;m trying to grok that<br><br>[] = id<br>++ = .<br><br>in the context of Hughes lists.<br><br>I guess it would stop to slip away if I knew what : corresponds to.
<br><div><div></div><div class="Wj3C7c"></div></div></blockquote><br>Well, (:) has type a -&gt; [a] -&gt; [a], so a function corresponding to (:) for Hughes lists should have type<br><br>foo :: a -&gt; H a -&gt; H a<br><br>
that is,<br><br>foo :: a -&gt; ([a] -&gt; [a]) -&gt; [a] -&gt; [a]<br><br>so it can be written<br><br>foo x h = (x:) . h<br><br>which lambdabot informs me can also be written as (.) . (:).&nbsp; But in the end I&#39;m not sure how helpful that is for understanding Hughes lists! I think the key sentence from the paper is this: &quot;by representing a list xs as the function (xs ++) that appends this list to another list that has still to be supplied.&quot;&nbsp; If you understand that sentence, then you can understand why [] is id and (++) is (.).
<br><br>-Brent<br><br></div>