import { state } from "https://deno.land/x/fun@v.2.0.0-alpha.11/mod.ts";
const { id } = state;
An instance of Id that makes the State structure a Category. This is often used at the beginning of a State workflow to specify the type of data within a State structure.
Examples
Example 1
Example 1
import * as S from "./state.ts";
import { pipe } from "./fn.ts";
const num = pipe(
S.id<number>(),
S.map(n => n + 1),
);
const result = num(1); // [2, 1]