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

Enhanced min and max built-in functions to Support Arrays of Integers and Floats #576

Merged
merged 2 commits into from
Feb 24, 2024

Conversation

ckganesan
Copy link
Contributor

@ckganesan ckganesan commented Feb 23, 2024

Enhanced support for array inputs in the min and max built-in functions, now accommodating arrays of integers and floats. This update extends the functionality to handle diverse data types seamlessly, improving the flexibility and usability of the functions. #574

@antonmedv
Copy link
Member

Cool! What about adding support for this as well?

max([1, 2, 3], 10) // output 10

@antonmedv
Copy link
Member

But I think it will complicate things. We can add flatten() builtin.

@ckganesan
Copy link
Contributor Author

Cool! What about adding support for this as well?

max([1, 2, 3], 10) // output 10

Certainly, I can include that as well if you'd like.

@ckganesan
Copy link
Contributor Author

Cool! What about adding support for this as well?

max([1, 2, 3], 10) // output 10

Based on your feedback, I have also implemented this support as per your comment.

@antonmedv antonmedv merged commit ae180c8 into expr-lang:master Feb 24, 2024
10 checks passed
@antonmedv
Copy link
Member

BTW, lets add this to https://expr-lang.org/docs/language-definition#mean and https://expr-lang.org/docs/language-definition#mean as well

@PranavPeshwe
Copy link
Contributor

Would be good to include some negative numbers in the tests.

@ckganesan ckganesan deleted the allow-array-min-max-builtins branch February 25, 2024 04:02
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

Successfully merging this pull request may close these issues.

3 participants