We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I don't find iterator adapter like itertools.accumulate(iterable[, func, *, initial=None]) in Rust itertools.
itertools.accumulate(iterable[, func, *, initial=None])
It would be nice to add it in.
The text was updated successfully, but these errors were encountered:
Isn't this scan?
scan
Sorry, something went wrong.
Yes it very similar to scan but it's not very obvious at first look. With initial=0 and the default func the addition.
initial=0
func
(1..8).scan(0, |x, y| { *x += y; Some(*x) })
while people from coming Python would expect something more like
(1..8).some_name(0, |x, y| x + y)
Like in #147
EDIT: Playground example of accumulate[_add] functions.
accumulate[_add]
No branches or pull requests
I don't find iterator adapter like
itertools.accumulate(iterable[, func, *, initial=None])
in Rust itertools.It would be nice to add it in.
The text was updated successfully, but these errors were encountered: