Why are strings linked lists?

Mark Carroll mark at chaos.x-philes.com
Sat Nov 29 21:43:14 EST 2003


On Sat, 29 Nov 2003 ajb at spamcop.net wrote:
(snip)
> Interesting that you mention this.  I've also been thinking about this
> lately in the context of the discussion on collections and the left-fold
> combinator both here and on LtU.  When people say "I want String to be
> [Char]", what I'm actually hearing is "I want String to be a collection
> of Char".  I may be mishearing.

It did strike me that it would be interesting if you could make various
things instances of a List sort of class and then take, reverse, etc.
would work on them. How this relates to your comment, I'm not sure.
Things like map, of course, could work on unordered bags of things too,
but I suppose that's what Functors are for.

-- Mark


More information about the Haskell mailing list