
20 Jun
2007
20 Jun
'07
7:04 p.m.
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.