compose
import { compose } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/fn.ts";Compose two functions by taking the output of one and passing it to another. This is equivalent to the map function.
@example
import { compose, pipe } from "./fn.ts";
const length = (s: string) => s.length;
const dup = (n: number) => n + n;
const composed = pipe(
length,
compose(dup),
);
const result1 = composed("Hello"); // 10
const result2 = composed(""); // 0