-
Notifications
You must be signed in to change notification settings - Fork 77
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 for arrays, iters, etc #994
Comments
MoonBit's In internal iterators, the provider of data (e.g. At this point, you may wonder why MoonBit chooses the less flexible internal style to implement iterators. This is because internal iterators are simpler to write and optimize, and is adequate for the most common scenario. Of course there are many cases where it is handly or even necessary to zip two iterators, and a iterator type that support zipping (i.e. external iterator) would be a good addition to MoonBit's current |
There is no problem with `Array::iter`` though, it would be great if you could implement it |
How about fn Iter::zipWith[T1, T2](self: Iter[T1], seq: Unit -> Option[T2]) -> Iter[T1, T2] |
Is seems zip is only implemented for
@immut/list.T
but notArray
orIter
. There seems to be no way to iterate over multiple iterators, and zipping two iterators fits well.I am willing to contribute this, please assign me if I may give it a try.
The text was updated successfully, but these errors were encountered: