Skip to content

Introduce special collection instance functions #29

@beikov

Description

@beikov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions