import { when } from "https://deno.land/x/rambda@9.4.1/rambda.js";
It pass input
to predicate
function and if the result is true
, it will return the result of whenTrueFn(input)
.
If the predicate
returns false
, then it will simply return input
.
Parameters
predicate: (x: T) => boolean