Skip to main content
Module

x/fun/mod.ts>optics.Optic

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

Our new Optic definition. Instead of get and set we use get and modify as set can be derived from modify(() => value). This drastically simplifies implementation.

Type Parameters

T extends Tag
S
A
definition: Viewer<T, S, A> & Modifier<S, A>