Closed 2ndDerivative closed 1 year ago
Hi there and thank you for the idea.
I am unsure if min/max are special enough to justify the existence of auxiliary methods for them, so I thought about generalizing this and offering a function that the user can plug in min/Max/anything else into...
... just to find out this already exists: https://docs.rs/itertools/latest/itertools/enum.EitherOrBoth.html#method.reduce
So my personal take on this would be to go without the specific min/max unless we have evidence that users really need this.
I saw that function too and the formulation of "Product" did not prepare me for what exactly it does. I thought it was about multiplication and was kind of irritated. I agree with the sentiment of not implementing this then, but would probably suggest improving the documentation for reduce()
Had the idea of this low-cost quality of life implementation on EitherOrBoth. Please give any feedback you have! Cheers!