import { fn } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { map } = fn;
Map over the output of a Fn. This is equivalent to function composition. ie. a => pipe(f, map(g))(a) === a => g(f(a))
Examples
Example 1
Example 1
import { map, of, pipe } from "./fn.ts";
const result = pipe(of(1), map(n => n + 1)); // 2