Skip to main content
Module

x/lazy/lib/lazy.ts>Lazy#max

A linq-like lazy-evaluation enumerable/iteration library that aims to support deno, node & browser
Latest
method Lazy.prototype.max
import { Lazy } from "https://deno.land/x/lazy@v1.7.3/lib/lazy.ts";

Returns the maximum value in the iterable.

Returns

TElement extends number ? number : never

The maximum element.

Returns the maximum value of result of the selector function over the iterable.

Parameters

selector: MapFn<TElement, number>

The transformation function to use for each element.

Returns

number

The maximum result of the selector function.