init

Returns the list after removing the last element.

Type

type init = <E>(s: E[]) => E[]

Example

import {init} from 'fnxt/array';

init([1, 2, 3, 4]) // -> [1, 2, 3]

See Also

|  head  |              tail              |
|---[0]-----[1]-----[2]-----[3]-----[4]---|
|              init              |  last  |