Skip to main content

min

For any type T,

min(collection: Bag<T>)  : T?

Gets the least item in the collection, or null if there are no items in the collection.

  • The least item in a collection is selected with the same order used for comparing items with relational expressions such as less-than (<) and greater-than (>).
  • See how comparisons work for more detail on the order of values.
  • Note that this method accepts both Lists and Bags ─since Lists subtype Bags

See also

Types

Functions