Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fun/optics.ts>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 Optic
import { type Optic } from "https://deno.land/x/fun@v2.0.0-alpha.6/optics.ts";

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>