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

modify

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

Construct a State<E, void> from a function E => E.

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

const state = S.modify((n: number) => n + 100);

const result = state(1); // [undefined, 101]
function modify<E>(fee: (e: E) => E): State<E, void>;
§
modify<E>(fee: (e: E) => E): State<E, void>
[src]

§Type Parameters

§Parameters

§
fee: (e: E) => E
[src]

§Return Type

§
State<E, void>
[src]