Skip to main content
Module

x/ramda/mod.ts>either

:ram: Practical functional Javascript
Latest
variable either
import { either } from "https://deno.land/x/ramda@v0.27.2/mod.ts";

A function wrapping calls to the two functions in an || operation, returning the result of the first function if it is truth-y and the result of the second function otherwise. Note that this is short-circuited, meaning that the second function will not be invoked if the first returns a truth-y value.

In addition to functions, R.either also accepts any fantasy-land compatible applicative functor.