max
Module Export
[value] |> numberTakes an iterator and returns the highest value.
If the iterator is an iterator of objects, a function is required to extract the value to compare. If the iterator is empty, the result is nothing. If two objects are equal, the last one is returned.
Examples
import 'iterators'
from [1, 2, 3] maxfrom [{ value: 1 }, { value: 2 }, { value: 3 }] max x => x.value