Author(s): Daniel Cabeza, Manuel Carro.
Version: 1.10#7 (2006/4/26, 19:22:13 CEST)
Version of last change: 1.7#208 (2002/4/23, 19:9:14 CEST)
This library implements a few basic higher-order predicates. These add functionality to the basic higher-order functionality of Ciao. Examples of the latter are: Using pred(1):
list(L, functor(_,2)) list(L, >(0))
Using pred(2):
hiordlib
)hiordlib
)
Meta-predicate with arguments: map(?,pred(2),?)
.
Usage: map(LList, Op, RList)
map([1,3,2], arg(f(a,b,c,d)), [a,c,b]) or map([1,3,2], nth([a,b,c,d]), [a,c,b]) map(["D","C"], append("."), ["D.","C."])
Meta-predicate with arguments: foldl(?,?,pred(3),?)
.
Usage: foldl(List, Seed, Op, Result)
?- foldl(["daniel","cabeza","gras"], "", (''(X,Y,Z) :- append(X, " "||Y, Z)), R). R = "daniel cabeza gras " ?
Meta-predicate with arguments: minimum(?,pred(2),?)
.
Usage: minimum(?List, +SmallerThan, ?Minimum)
Minimum
is the smaller in the nonempty list List
according to the relation SmallerThan
:
SmallerThan(X, Y)
succeeds iff X is smaller than Y.
?List
is a list.
(basic_props:list/1
)
+SmallerThan
is a term which represents a goal, i.e., an atom or a structure.
(basic_props:callable/1
)
?Minimum
is any term.
(basic_props:term/1
)
Go to the first, previous, next, last section, table of contents.