brownplt/pyret-lang — pull request #132 by ejcaruso (2013-12-05 23:15:33+00:00)
Title: Set improvements: move less-than check, symmetric difference, don't forc...

...e sorting on to-list to allow arbitrary order

Put in a pull request mostly for the latter "improvement". Returning a sorted list seems not to be the duty of the set implementation, so we should allow for arbitrarily-ordered lists. The user can sort the list themselves if they want it to be sorted. (I made the tree-set implementation return a preorder-traversal list instead of an inorder-traversal list so that people couldn't count on the list to be sorted, either, as discussed with @justinpombrio earlier).

This represents a pretty decent API change for a standard library, though, so it's not going straight to master.