[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

collection-fold-right for unordered collections

This page is part of the web mail archives of SRFI 44 from before July 7th, 2015. The new archives for SRFI 44 contain all messages, not just those from before July 7th, 2015.

I'm thinking that unordered collections are not quite fully specified.

A key question is whether collection-fold-left will return the elements of the collection in the same (unspecified) order or not when used multiple times.

It seems to me that either unordered collections should either always enumerate in the same order as long as they are not modified, or there needs to be some way to distinguish unordered collections that make no representation about repeating the enumeration order.

And if an unordered collection *will* preserve the enumeration order (which would be typical for many straightforward implementations) then collection-fold-right should be defined to enumerate in the reverse of that same unspecified (but invariant-while-not-modified) order.

"I love deadlines. I love the whooshing sound they make as they fly by." -- Douglas Adams