max

get maximum element in given collection


Parameters

max collection :block :range

Attributes

indexretrieve index of maximum element

Returns

  • :null
  • :any

Examples

copy
print max [4 2 8 5 1 9] ; 9

Related