ifElse
ifElse(predicate, onTrue, onFalse)
Conditionally applies one of two functions based on a predicate result.
ts
ifElse(
5,
(x) => x > 3,
(x) => x * 2,
(x) => x * 3,
); // 10
ts
pipe(
5,
ifElse(
(x) => x > 3,
(x) => x * 2,
(x) => x * 3,
),
); // 10