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

id

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

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

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

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

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

§Type Parameters

§
B = never
[src]

§Return Type