ask/predicate
Types
Functions
pub fn all(p: fn(a) -> Bool) -> fn(List(a)) -> Bool
Create a new predicate that returns True
if the given predicate returns
True
for every element in a list.
pub fn and(
first: fn(a) -> Bool,
second: fn(a) -> Bool,
) -> fn(a) -> Bool
Combine two predicates together into a new predicate that returns True
if
both predicates return True
.
pub fn any(p: fn(a) -> Bool) -> fn(List(a)) -> Bool
Create a new predicate that returns True
if the given predicate returns
True
for any element in a list.
pub fn every(ps: List(fn(a) -> Bool)) -> fn(a) -> Bool
Combine a list of predicates together into a new predicate that returns True
if all predicates return True
.
pub fn map_input(
over p: fn(a) -> Bool,
with fun: fn(b) -> a,
) -> fn(b) -> Bool
Map the input of a predicate to create a new predicate.
pub fn or(
first: fn(a) -> Bool,
second: fn(a) -> Bool,
) -> fn(a) -> Bool
Combine two predicates together into a new predicate that returns True
if
either predicate returns True
.