-
Notifications
You must be signed in to change notification settings - Fork 36
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
add min and max macros #373
Comments
I like the idea of |
Feels a bit weird though to have two versions of |
Another option could be a rest operator macro: value: math.min(array.rest('myArray')) // Math.min(...myArray) |
Would that really work? As I see it the math.min is just a pass through to Math.min. What would the array.rest do to make this work on the input side? The (curried)computed that math.min uses is still just giving the parameters the normal way right? |
It wouldn't work without a lot of changes. I was just throwing it out there. |
Ah, ok. I see. I'll have to think about it. Could make it more uniform. But I don't know if there are really more use cases for the |
Maybe an |
You do have Math.min/max, but those only work on non-array arguments. Ember.computed.min/max work on arrays. You do have a reduce, but I don't want to use that each time I want a min or max
I don't know if these should become
array.min
andarray.max
?The text was updated successfully, but these errors were encountered: