Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

id

import { id } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/state.ts";

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.

@example
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]
function id<E>(): State<E, E>;
§
id<E>(): State<E, E>
[src]

§Type Parameters

§Return Type