Predicate factories for filter chains and control flow. Bind a comparison once, reuse it against many values. Combine predicates with AND / OR / NOT to build richer conditions without repeating yourself.
$isFoo = C\isEqualTo('foo');
$isFoo('foo'); // true
$isFoo('bar'); // false
$over18 = C\isGreaterThanOrEqualTo(18);
$over18(21); // true
$over18(17); // false
$inPalette = C\isEqualIn(['red', 'green', 'blue']);
$inPalette('red'); // true
$inPalette('yellow'); // falseAlso: isNotEqualTo, isGreaterThan, isLessThan, isLessThanOrEqualTo.
$isString = C\isScalar('string'); // curried — binds the gettype() name
$isString('hello'); // true
$isString(42); // false
C\isNumber(3.14); // true — direct call (int or float only)
C\isNumber('3.14'); // false — stricter than is_numeric()
C\notEmpty([]); // false
C\notEmpty('hello'); // trueAlso: isTrue, isFalse, sameScalar, allTrue, anyTrue.
$isStringLongEnough = C\groupAnd('is_string', fn($s) => strlen($s) >= 3);
$isStringLongEnough('ok'); // false
$isStringLongEnough('hello'); // true
$isNotZero = C\not(C\isEqualTo(0));
$isNotZero(0); // false
$isNotZero(5); // trueany / all are aliases of groupOr / groupAnd with a more natural reading.