Skip to main content
Module

x/fun/optics.ts>Refold

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

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>