import { fn } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { over } = fn;
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.