isTrue top-level constant
Tests whether the given boolean argument x
is true.
Useful as a predicate for filter-type higher-order functions.
[true, true, true, false, true].all(isTrue) // false
The identity function on bool forms its predicate.
id := λx.x where x: bool ≡ bool isTrue(bool x) => x;
Implementation
// ignore: unused_result
const isTrue = identity<bool>;