maximum

get maximum item from collection based on given predicate


Parameters

maximum collection :integer :string :literal :dictionary :object :inline :block :range
        params :null :literal :block
        condition :block :bytecode

Attributes

with:literaluse given index
valuealso include predicate values

Returns

  • :block
  • or  :nothing

Examples

copy
maximum 1..10 'x -> size factors.prime x ; => 8 ; 8 has the maximum number of ; prime factors: 2, 2, 2 (3)

copy
maximum.value 1..10 'x -> size factors.prime x ; => [8 3]

Related