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

x/fun/state.ts>modify

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

Construct a State<E, void> from a function E => E.

Examples

Example 1

import * as S from "./state.ts";
import { pipe } from "./fn.ts";

const state = S.modify((n: number) => n + 100);

const result = state(1); // [undefined, 101]

Parameters

fee: (e: E) => E