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

left

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

Construct a Left value from an error or failure value.

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

const result1 = E.left("Network error");
// { tag: "Left", left: "Network error" }

const result2 = E.left(new Error("Something failed"));
// { tag: "Left", left: Error("Something failed") }
function left<E, A = never>(left: E): Either<E, A>;
§
left<E, A = never>(left: E): Either<E, A>
[src]

§Type Parameters

§
A = never
[src]

§Parameters

§
left: E
[src]

§Return Type