[Haskell-cafe] Collections

Lennart Augustsson lennart at augustsson.net
Wed Jun 20 14:51:59 EDT 2007


I don't think the collection type (a,b) is best thought of as a loop.
Neither is a (non-trivial) tree.

On 6/20/07, Andrew Coppin <andrewcoppin at btinternet.com> wrote:
>
> Derek Elkins wrote:
> > On Tue, 2007-06-19 at 18:49 -0400, Brandon S. Allbery KF8NH wrote:
> >
> >> Haskell is, in many ways, a descendant of Lisp.  This does tend to
> >> lead to lists being *the* collection type, in my experience:  sure,
> >> others get used, but lists are the ones you see in examples and such.
> >>
> >
> > Not in my experience.  Certainly lists are used all over the place*, but
> > I rarely see them abused.  Also, "lists" aren't lists in Lisp, they're
> > more akin to rose-trees (or going the other way, there are only pairs in
> > Lisp).
> >
>
> http://xkcd.com/c224.html
>
> > In practice, almost all Haskell programs use custom defined algebraic
> > data types which are usually tree like.  Declaring and using data types
> > is easier in Haskell than it is in almost any other language.
> >
>
> True...
>
> > * As others have mentioned, lists represent loops and loops are
> > extremely common in programming in general.
> >
>
> Um... surely *every* collection type represents a loop?
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070620/bebe0b29/attachment.htm


More information about the Haskell-Cafe mailing list