Skip to main content
Module

x/fun/mod.ts>filterable.Filterable

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
interface filterable.Filterable
implements Hold<U>
import { type filterable } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { Filterable } = filterable;

A Filterable structure allows one to filter over the values contained in the structure. This includes standard filter, filterMap, partition, and partitionMap.

Type Parameters

U extends Kind

Properties

readonly
filter: { <A, I extends A>(refinement: Refinement<A, I>): <B = never, C = never, D = unknown, E = unknown>(ta: $<U, [A, B, C], [D], [E]>) => $<U, [I, B, C], [D], [E]>; <A>(predicate: Predicate<A>): <B = never, C = never, D = unknown, E = unknown>(ta: $<U, [A, B, C], [D], [E]>) => $<U, [A, B, C], [D], [E]>; }
readonly
filterMap: <A, I>(fai: (a: A) => Option<I>) => <B = never, C = never, D = unknown, E = unknown>(ua: $<U, [A, B, C], [D], [E]>) => $<U, [I, B, C], [D], [E]>
readonly
partition: { <A, I extends A>(refinement: Refinement<A, I>): <B = never, C = never, D = unknown, E = unknown>(ta: $<U, [A, B, C], [D], [E]>) => Pair<$<U, [I, B, C], [D], [E]>, $<U, [A, B, C], [D], [E]>>; <A>(predicate: Predicate<A>): <B = never, C = never, D = unknown, E = unknown>(ta: $<U, [A, B, C], [D], [E]>) => Pair<$<U, [A, B, C], [D], [E]>, $<U, [A, B, C], [D], [E]>>; }
readonly
partitionMap: <A, I, J>(fai: (a: A) => Either<J, I>) => <B = never, C = never, D = unknown, E = unknown>(ua: $<U, [A, B, C], [D], [E]>) => Pair<$<U, [I, B, C], [D], [E]>, $<U, [J, B, C], [D], [E]>>