cond<L, R> static method

Either<L, R> cond<L, R>(
  1. bool predicate(),
  2. Function0<R> r,
  3. Function0<L> l
)

Implementation

static Either<L, R> cond<L, R>(bool predicate(), Function0<R> r, Function0<L> l) =>
  predicate() ? right(r()) : left(l());