protocol
Useful meta-predicates protocol.
Paulo Moura
3.0
2006/9/17
static
(no dependencies on other files)
True if the argument can be called as a goal.
static
callable(Term)
callable(@term) – zero_or_one
Returns a list of all list elements that satisfy a predicate.
static
filter(Predicate, In, Out)
filter(1, *, *)
filter(+callable, +list, -list) – one
Calls Goal once but always succeeds, even if Goal fails.
static
ignore(Goal)
ignore(::)
ignore(@callable) – one
Maps a predicate over a list of elements.
static
map(Predicate, In, Out)
map(2, *, *)
map(+callable, ?list, ?list) – zero_or_more
True if the predicate succeeds for each list element.
static
succeeds(Predicate, List)
succeeds(1, *)
succeeds(+callable, +list) – zero_or_more
(none)
(none)