Next Prev Up Top Contents Index

any

Function
Syntax

any pattern-to-instantiate goal-to-prove

Arguments

pattern-to-instantiate is a list or symbol. goal-to-prove is any backward chaining goal.

Description

The backward chaining inference engine is started to look for any set of bindings which satisfy goal-to-prove . Using those bindings, pattern-to-instantiate is instantiated and returned.

Values

Two values are returned. The second value indicates with T that a proof was found, or with nil that no proof exists. In the former case, the first value is the instantiated version of pattern-to-instantiate , in the latter case, the first value is nil .

Examples
(any '(?x is in (1 2 3)) '(member ?x (1 2 3)))

returns (1 is in (1 2 3))

(any '(?truck is a truck) '(truck ?truck))

returns (#<TRUCK TRUCK5> IS A TRUCK)

See Also

findall


LispWorks KnowledgeWorks and Prolog User Guide - 14 Dec 2001

Next Prev Up Top Contents Index