I don't think the collection type (a,b) is best thought of as a loop.<br>
Neither is a (non-trivial) tree.<br><br><div><span class="gmail_quote">On 6/20/07, <b class="gmail_sendername">Andrew Coppin</b> <<a href="mailto:firstname.lastname@example.org">email@example.com</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Derek Elkins wrote:<br>> On Tue, 2007-06-19 at 18:49 -0400, Brandon S. Allbery KF8NH wrote:
<br>><br>>> Haskell is, in many ways, a descendant of Lisp. This does tend to<br>>> lead to lists being *the* collection type, in my experience: sure,<br>>> others get used, but lists are the ones you see in examples and such.
<br>>><br>><br>> Not in my experience. Certainly lists are used all over the place*, but<br>> I rarely see them abused. Also, "lists" aren't lists in Lisp, they're<br>> more akin to rose-trees (or going the other way, there are only pairs in
<br>> Lisp).<br>><br><br><a href="http://xkcd.com/c224.html">http://xkcd.com/c224.html</a><br><br>> In practice, almost all Haskell programs use custom defined algebraic<br>> data types which are usually tree like. Declaring and using data types
<br>> is easier in Haskell than it is in almost any other language.<br>><br><br>True...<br><br>> * As others have mentioned, lists represent loops and loops are<br>> extremely common in programming in general.
<br>><br><br>Um... surely *every* collection type represents a loop?<br><br>_______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org