Skip to content

Add min and max as list functions #441

@joente

Description

@joente

Is your feature request related to a problem? Please describe.
Both min() and max() are used often in languages to quickly find a minimum value in a list.

Describe the solution you'd like

[6, 3, 8, 5].min();  // should return 3
[6, 3, 8, 5].max();  // should return 8

This may also be used to find the "newest" (or "oldest") object from a list:

Person(.people.map_id().max());  // newest person (highest ID)
Person(.people.map_id().min());  // oldest person (lowest ID)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions