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

Introduce special collection instance functions #29

Open
beikov opened this issue Apr 7, 2021 · 0 comments
Open

Introduce special collection instance functions #29

beikov opened this issue Apr 7, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@beikov
Copy link
Member

beikov commented Apr 7, 2021

When #28 is done, we can introduce some special collection instance functions like the following:

  • any - Returns any element
  • min - Returns the minimum element, optional ordering argument?
  • max - Returns the maximum element, optional ordering argument?
  • size - Returns the size of the collection
  • sum - Returns the sum of the collection elements, optional Function argument to extract value to sum?
  • avg - Returns the average of the collection elements, optional Function argument to extract value to average?

Note though, that it would be nice if we could add the functions to specific collection types only i.e. use a receiver type of Collection[UserType] so that the function is only available for types that really support this.
This kind of also depends on #30

@beikov beikov added the enhancement New feature or request label Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant