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

put

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

Construct a State<E, void> from a static state value E.

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

const state = pipe(
  S.id<number>(),
  S.flatmap(n => pipe(S.id<number>(), S.map(m => m + n))),
);

const result = state(100); // [2, 1]
function put<E>(e: E): State<E, void>;
§
put<E>(e: E): State<E, void>
[src]

§Type Parameters

§Parameters

§Return Type

§
State<E, void>
[src]