import type { List } from "."; import type { Args, Call1W, Fn1, GenericFn, GenericResolver, GenericReturn1W, Param0, Return, } from "../HKT"; /** * Apply a function to each element of a {@link List} (i.e., fixed-length tuple). * * Sig: `(f: (x: T) => U, xs: List) => List` */ export type Map = { [K in keyof TS]: Call1W; }; interface Resolver extends GenericResolver<[Fn1, List], List> { on1_: ([f]: Args) => [[List>], List>]; on_1: ([, xs]: Args) => [[Fn1<(typeof xs)[number]>], List]; on11: ([f, xs]: Args) => [[], List>]; on__r: ([, , r]: Args) => [Fn1, List]; on1_r: ([f, , r]: Args) => [List>]; on_1r: ([, xs, r]: Args) => [Fn1<(typeof xs)[number], (typeof r)[number]>]; } /** * [Fn] Apply a function to each element of a {@link List} (i.e., fixed-length tuple). * * Sig: `(f: (x: T) => U, xs: List) => List` */ export default interface MapFn extends GenericFn { def: ([f, xs]: Args) => Map; }