Skip to main content
Module

x/fun/mod.ts>optics.imap

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function optics.imap
import { optics } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { imap } = optics;

Invariant map over the focus of an existing Optic.

Parameters

fai: (a: A) => I
fia: (i: I) => A

Returns

<U extends Tag, S>(first: Optic<U, S, A>) => Optic<Align<U, GetTag>, S, I>