Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

over

import { over } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/fn.ts";

A common pattern in optics is to apply an input value to a function at the beginning and the end of a computation. This can (and has) been achieved by the composition of Pair using flow(P.dup, P.map(fn), P.merge). But for performance reasons it's nice to have a straighforward function that achieves the same result.

function over<A, I>(faai: (a: A) => (a: A) => I): (a: A) => I;
§
over<A, I>(faai: (a: A) => (a: A) => I): (a: A) => I
[src]

§Type Parameters

§Parameters

§
faai: (a: A) => (a: A) => I
[src]

§Return Type

§
(a: A) => I
[src]