Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/mod.ts>fn_either.right

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function fn_either.right
import { fn_either } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { right } = fn_either;

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

Examples

Example 1

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

const rightNumber = right(1);

const result = rightNumber(null); // Right(1);

Type Parameters

A
optional
D = unknown
optional
B = never