length

Returns the length of an array. Consumes the array before returning. Returns 0 if the array is empty. Does not terminate on infinite arrays.

Type

type length = <E>(s: Array<E>) => number

Example

import {length} from 'fnxt/array';

const array = [2, 3, 4];
length(array) // -> 3