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/either.ts";

Construct a Right value from a successful result.

@example
import * as E from "./either.ts";

const result1 = E.right(42);
// { tag: "Right", right: 42 }

const result2 = E.right("Success!");
// { tag: "Right", right: "Success!" }
function right<A, E = never>(right: A): Either<E, A>;
§
right<A, E = never>(right: A): Either<E, A>
[src]

§Type Parameters

§
E = never
[src]

§Parameters

§
right: A
[src]

§Return Type