min
Full name: taxi.stdlib.min
Signature
declare extension function <T,A> min(collection: T[], callback: (T) -> A):ADescription
Returns the minimum value in the collection, computed by applying the selector function to each element.
find { products: Product[] } as {
cheapest: Price = products.min((Product) -> Price)
}Examples
Returns the minimum price from a collection of products.
Try it out
Schema
Query Plan
Play with this snippet by editing it here, or edit it on Taxi Playground
Result
Query failed