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

right

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

Create a FnEither that always returns a Right(A).

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

const rightNumber = right(1);

const result = rightNumber(null); // Right(1);
function right<A, D = unknown, B = never>(right: A): FnEither<D, B, A>;
§
right<A, D = unknown, B = never>(right: A): FnEither<D, B, A>
[src]

§Type Parameters

§
D = unknown
[src]
§
B = never
[src]

§Parameters

§
right: A
[src]

§Return Type