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

gets

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

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

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

const length = S.gets((s: string) => s.length);

const result = length("Hello World"); // [11, "Hello World"]
function gets<E, A>(fea: (e: E) => A): State<E, A>;
§
gets<E, A>(fea: (e: E) => A): State<E, A>
[src]

§Type Parameters

§Parameters

§
fea: (e: E) => A
[src]

§Return Type