Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing/Using the CachedIterator role
This is CachedIterator role is a refinement of the PredictiveIterator role. The difference is that a CachedIterator role is supposed to supply a "cache" method that will be called to set the cache of the Seq as soon as the iterator is being used. By having R:Iterator.ReifiedArrayIterator and R:Iterator.ReifiedListIterator consume this role, makes the following code work again: given Seq.new((1,2,3).iterator) { dd .elems; dd .all; dd .all } # 3 # all(1, 2, 3) # all(1, 2, 3) which was broken by: 9107215
- Loading branch information
Showing
3 changed files
with
23 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters