_min
Produces the least of the received values --
Function
Anything -> _min
(exp) -> The same Type
- Receives
- A List of any sort
- exp (optional)
- An optional expression to apply to each received value
- Produces
- The lowest of the received values
In its simple form, with no parameters, _min
takes a List of values, and
produces whatever is least from them:
<7, 28, 3, 5, 108> -> _min
produces 3.
The more interesting and common usage, however, takes one parameter, which is an expression.
This applies the received values (usually Things) to that expression, and produces the one that
had the lowest result:
All Games -> _min(Price)
produces the Game with the lowest Price.
You can get a similar result by using _sort
and taking the first value of the results, but _min
is much, much faster, and should be used instead when possible.