Skip to main content
Module

x/fun/mod.ts>state.wrap

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

Construct a State<E, A> from a static value A.

Examples

Example 1

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

const state = S.wrap(1);

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

Type Parameters

A
optional
E = unknown