[Haskell-cafe] Collections
Andrew Coppin
andrewcoppin at btinternet.com
Wed Jun 20 15:04:25 EDT 2007
Lennart Augustsson wrote:
> I don't think the collection type (a,b) is best thought of as a loop.
True. That's a rather special type; I haven't seen anything remotely
like it in any other language.
> Neither is a (non-trivial) tree.
Erm... Depends on your idea of "loop" I suppose.
A tree represents a recursive loop quite nicely. ;-)
My point of course was that an array is a loop just as much as a list
is. Same goes for a set. Or even a dictionary (looping over key/value
pairs), whichever way it's implemented internally.
More information about the Haskell-Cafe
mailing list