closes #150, Resolve stack overflow for SortedSet reduce & reduceRight
Replace recursive implementation with version that uses the Iterator. The limit in size of the set now seems to be whenever the browser runs out of memory to allocate for the main tree + the history tree in splay.
Updated the Iterator to take a 4th argument: reverse. If reverse is falsey then behaviour is the same as master, otherwise it will iterator through the set in the reverse order.
closes #150, Resolve stack overflow for SortedSet reduce & reduceRight
Replace recursive implementation with version that uses the Iterator. The limit in size of the set now seems to be whenever the browser runs out of memory to allocate for the main tree + the history tree in splay. Updated the Iterator to take a 4th argument:
reverse
. Ifreverse
is falsey then behaviour is the same as master, otherwise it will iterator through the set in the reverse order.