Skip to main content
Module

x/fae/mod.ts>either

A functional module for Deno inspired from Ramda.
Latest
variable either
import { either } from "https://deno.land/x/fae@v1.1.1/mod.ts";

A function wrapping calls to the two functions in an || operation, returning the result of the first function if it is true and the result of the second function otherwise. Second function will not be invoked if the first returns a true value.

 const gt10 = x => x > 10
 const even = x => (x & 1) === 0
 const f = Fae.either(gt10, even)
 f(101) //=> true
 f(8) //=> true

type

Either