chapel-lang/chapel — pull request #336 by bradcray (2014-09-08 18:59:46+00:00)
Title: First draft sorterator

This is a first draft of a sorterator -- an iterator that takes some
other iterator or iterable as input, captures it into an array, sorts
it, and yields the elements back out to the user. The current
limitations in the implementation reflect limitations in the language:

(1) There's no particularly good way to constrain the formal type to
be an iterator or iterable;

(2) There's no particularly good way to declare the type of the
temporary array;

Also added a test that invokes the sorterator in three ways, one with
an array, two with invocations of iterators.