A Cat
which contains a mapping function.
An applied function which maps from Cat<T>
to Cat<U>
.
import { cat, apply } from "./cat.ts";
import { assertEquals } from "../deps.ts";
const sub = cat((numeral: string) => parseInt(numeral, 10));
const actual = apply(sub)(cat("1024")).value;
assertEquals(actual, 1024);
Generated using TypeDoc
Lifts down a
Cat
which contains a mapping function. It is useful to decompose a function inCat
.