Skip to main content
Module

x/fun/state.ts>state

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

Construct a trivial State<E, A> from values E and A.

Examples

Example 1

import * as S from "./state.ts";

const state = S.state(1, 2);

const result = state(10); // [2, 1]