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

zip extension method for Iterator and Iterable #10

Open
4 tasks
Boereck opened this issue May 8, 2018 · 0 comments
Open
4 tasks

zip extension method for Iterator and Iterable #10

Boereck opened this issue May 8, 2018 · 0 comments

Comments

@Boereck
Copy link
Member

Boereck commented May 8, 2018

Implement a zip extension method for Iterable and Iterator. This method will produce a list of pairs from both sources by their index. This is known from other languages and frameworks, such as Haskell, Scala, Kotlin, or Eclipse Collections.

  • static def <T,V> Iterable<Pair<T,V>> zip(Iterable<? extends T>, Iterable<? extends V>)
  • static def <T,V,Y> Iterable<Y> zip(Iterable<? extends T>, Iterable<? extends V>, (T,V)=>Y merger)
  • static def <T,V> Iterator<Pair<T,V>> zip(Iterator<? extends T>, Iterator<? extends V>)
  • static def <T,V,Y> Iterator<Y> zip(Iterator<? extends T>, Iterator<? extends V>, (T,V)=>Y merger)

If you want this ticket to be implemented, please give feedback, since it is only implemented on demand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant