-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Why no index or observable arguments in scan's accumulator? #1614
Comments
I don't recall why In case of Rx.Observable.of('a','b','c','d').scan((acc, value) => {
acc.idx++;
acc.value = value;
return acc;
}, { idx : -1, value: null }).subscribe(x => {
console.log(`index: ${x.idx}, value: ${x.value}`);
}); (just wrote in a hurry only for pseudo purpose) |
@kwonoj I ended up doing something like that in my case but it felt forced. I understand the drop of observable but all (most?) of the operators with selector functions have an index argument, no? |
Most of operators requiring |
I believe we could add at least the index without any negative impact. Should be there IMO. |
I agree it can be added, just curious if there was reason to not to. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sorry if this kind of question is out of place or out of format.
The text was updated successfully, but these errors were encountered: