Skip to content

add Iterator#dropInPlace #65

Open
Open
@NthPortal

Description

@NthPortal

.drop(...) is equivalent to calling .next() (up to) a given number of times, which is very useful. unfortunately, .drop(...) is not required to return the same instance (though the default implementation does), which means you need to assign it to a fresh val. Having to create a second binding for the iterator is ugly, and potentially error prone if you accidentally keep using the old Iterator instance. .dropInPlace(...) would be guaranteed to return this.type, allowing you to keep a single val/binding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlibrary:collectionsstatus:pendingThis enhancement request lacks consensus on whether or not to include it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions