-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add iterator support #5
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
base: master
Are you sure you want to change the base?
Conversation
| } | ||
| } | ||
|
|
||
| // Map applies the Mapper function to each element of the iterator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Map applies the Mapper function to each element of the iterator. | |
| // MapIter applies the Mapper function to each element of the iterator. |
|
|
||
| import "iter" | ||
|
|
||
| // FilterIter takes an iterator and a matcher and returns only those elements that satisfy the matcher. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // FilterIter takes an iterator and a matcher and returns only those elements that satisfy the matcher. | |
| // FilterIter takes an iterator and a matcher and returns an iterator that yields only those | |
| // elements that satisfy the matcher. |
| } | ||
| } | ||
|
|
||
| // Reducer is a function that reduces an iterator's elements to a single value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Reducer is a function that reduces an iterator's elements to a single value. | |
| // ReduceIter is a function that reduces an iterator's elements to a single value. |
| @@ -0,0 +1,41 @@ | |||
| package f | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing license header
A first set of iterator manipulation functions.