Package: effect
Module: Array
Finds the maximum element in an array based on a comparator.
Example
import { Array, Order } from "effect"
const result = Array.max([3, 1, 2], Order.number)
console.log(result) // 3
Signature
declare const max: { <A>(O: Order.Order<A>): (self: NonEmptyReadonlyArray<A>) => A; <A>(self: NonEmptyReadonlyArray<A>, O: Order.Order<A>): A; }
Since v2.0.0