Skip to main content
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.
Go to Latest
function fn_either.right
import { fn_either } from "https://deno.land/x/fun@v2.0.0-alpha.6/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