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

fromFn

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

Lift a Fn<D, A> into FnEither<[D], never, A>

@example
import { fromFn } from "./fn_either.ts";

const double = (first: number) => first + first;
const lifted = fromFn(double);

const result = lifted(1); // Right(2)
function fromFn<D, A>(fda: Fn<D, A>): FnEither<D, never, A>;
§
fromFn<D, A>(fda: Fn<D, A>): FnEither<D, never, A>
[src]

§Type Parameters

§Parameters

§
fda: Fn<D, A>
[src]

§Return Type

§
FnEither<D, never, A>
[src]