UNPKG

pragmatic-fp-ts

Version:

Opinionated functional programming library with easy use in mind

6 lines (4 loc) 129 B
import { getValueOr } from "./main.ts"; export function init<A>(coll: A[]): A[] { return getValueOr([], coll).slice(0, -1); }