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

idLeft

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

Perform the same function as Reader askLeft. Given a type B (and optionally a type A), return a FnEither<[B], B, A>. This is useful for starting a FnEither flatmap with a left value.

@example
import * as FE from "./fn_either.ts";
import { pipe } from "./fn.ts";

const computation = FE.idLeft<number>();

const result1 = computation(1); // Left(1);
const result2 = computation(2); // Left(2);
function idLeft<B, A = never>(): FnEither<B, B, A>;
§
idLeft<B, A = never>(): FnEither<B, B, A>
[src]

§Type Parameters

§
A = never
[src]

§Return Type