import type { List } from "."; import type { Args, GenericFn, GenericResolver } from "../HKT"; import type { None, Option, Some } from "../Option"; /** * Get all elements in a {@link List} except the first one. * * Sig: `(xs: List) => Option>` */ export type Tail = TS extends readonly [unknown, ...infer Tail] ? Some : None; interface Resolver extends GenericResolver<[List], Option>> { on1: ([xs]: Args) => [ [], Option>, ]; } /** * [Fn] Get all elements in a {@link List} except the first one. * * Sig: `(xs: List) => Option>` */ export default interface TailFn extends GenericFn { def: ([xs]: Args) => Tail; }