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

What about reduced? #75

Closed
levino opened this issue Dec 13, 2018 · 7 comments
Closed

What about reduced? #75

levino opened this issue Dec 13, 2018 · 7 comments

Comments

@levino
Copy link

levino commented Dec 13, 2018

I am looking for R.reduced to prevent excessive reducing. Any plans for it?

@paldepind
Copy link
Member

That is a nice idea. It's not very difficult to add. The only reason why it hasn't been added yet is that I'm afraid that checking for reduced may affect the performance of the "normal" reduce.

What do you think about adding a variant of reduce that supports reduced?

@levino
Copy link
Author

levino commented Dec 17, 2018

#76 is unrelated.

@levino
Copy link
Author

levino commented Dec 17, 2018

If you are concerned about performance, then at least one should implement reduceWhile.

I checked out the source and tried to implement it but I have to say I failed. The current code base is quite hard to understand.

@paldepind
Copy link
Member

If you are concerned about performance, then at least one should implement reduceWhile.

That is a good idea. reduceWhile can easily be added.

@paldepind
Copy link
Member

I've now added reduceWhile. It is part of the 2.0.17 release.

Considering that there doesn't seem to be much love for reduced even in Ramda (ramda/ramda#2613) I don't think I'll add it.

@levino
Copy link
Author

levino commented Feb 10, 2019

reduceWhile is sufficient imo. Thank you!

@paldepind
Copy link
Member

Great. Thank you for bringing up this issue 😄

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

No branches or pull requests

2 participants