allPass
Create a function that combines all predicates with 'and'.
Func f = (Func)R.allPass.run(
R.startsWith.apply('c'),
R.endsWith.apply('t')
);
system.debug(f.run('cat'));
// trueCreate a function that combines all predicates with 'and'.
Func f = (Func)R.allPass.run(
R.startsWith.apply('c'),
R.endsWith.apply('t')
);
system.debug(f.run('cat'));
// trueCreate a function that combines all predicates with 'or'.
Func f = (Func)R.anyPass.run(
R.startsWith.apply('c'),
R.endsWith.apply('t')
);
system.debug(f.run('cc'));
// trueCreate a function that negate the predicate.
Func f = (Func)R.complement.run(R.equals.apply('cat'));
system.debug(f.run('cat'));
// falseTest logic 'and'.
R.doAnd.run(true, false)
// falseTest logic 'not'.
R.doNot.run(false)
// trueTest logic 'or'.
R.doOr.run(true, false)
// trueContribute on Github! Edit this section.