Skip to main content
Module

x/fun/mod.ts>optic.Refold

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

Refold<S, A> is an alias of Fold<S, A> & Reviewer<S, A>. This means that a Refold operates exactly like a Fold with the added ability to reconstruct an S from a single value A. Examples of this are reconstructing an Array from a value A, or reconstructing a Tree from a value A.

definition: Fold<S, A> & Reviewer<S, A>