Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HashMap: allow valueIterable to be iterated more than once #27

Merged
merged 1 commit into from
Jan 22, 2019
Merged

Commits on Jan 21, 2019

  1. HashMap: allow valueIterable to be iterated more than once

    Iterators are stateful and can't be reused.  Therefore, the iterator protocol
    makes Iterable's contain a zero-argument function which creates a new iterator,
    and re-calls this zero-argument function to create a new iterator every time
    an iteration starts.
    
    hamt.values() returns an iterator which is stateful, so it must be wrapped in
    a zero-argument function to become an Iterable<T>.
    wuzzeb committed Jan 21, 2019
    Configuration menu
    Copy the full SHA
    ebe80f0 View commit details
    Browse the repository at this point in the history