Skip to content

Add a by keyword to maximum and minimum #28210

Open
@davidanthoff

Description

@davidanthoff

Essentially the same thing that already exists for sort: an option to specify a selector function, so that the maximum is determined by whatever the selector function returns, but then the maximum function returns an element from the original input sequence.

For example, maximum([(a=1,b=2),(a=2,b=1)], by=i->i.b) would return (a=1,b=2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIndicates new feature / enhancement requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions