Skip to content

last

last<A>(data): Option<A>

Defined in: Core/Arr.ts:45

Returns the last element of an array, or None if the array is empty.

A

readonly A[]

Option<A>

Arr.last([1, 2, 3]); // Some(3)
Arr.last([]); // None