Libraries anvil lang iterator sort

iterator sort()
iterator sort(object comparator)
Sorts the elements in this iterator using given comparator function, if comparator function is omitted natural ordering is used. This operation unfolds the iterator to tree, and returns depth-first iterator to generated tree.
Parameters comparator -  Callable comparator, receiving parameters (value1, value2)