Funx.Predicate.IsTrue (funx v0.8.4)

View Source

Predicate that checks if a value is true.

This is a convenience predicate for checking boolean flags. Uses strict equality (== true), not truthiness.

Examples

use Funx.Predicate

# Check if a flag is true
pred do
  check [:poison, :active], IsTrue
end

# Equivalent to
pred do
  check [:poison, :active], fn active -> active == true end
end