import type { List } from "."; import type { Args, GenericFn, GenericResolver } from "../HKT"; import type { Broaden } from "../helpers"; /** * Concatenate two {@link List}s. * * Sig: `(xs: List, ys: List) => List` */ export type Concat = TS extends unknown[] ? [...TS, ...US] : readonly [...TS, ...US]; interface Resolver extends GenericResolver<[List, List], List> { on1_: ([xs]: Args) => [ [List>], List>, ]; on_1: ([, ys]: Args) => [ [List>], List>, ]; on11: ([xs, ys]: Args) => [[], List<(typeof xs)[number] | (typeof ys)[number]>]; } /** * [Fn] Concatenate two {@link List}s. * * Sig: `(xs: List, ys: List) => List` */ export default interface ConcatFn extends GenericFn { def: ([xs, ys]: Args) => Concat; }