[ Reference Manual | Alphabetic Index ]


The apply/2 higher-order predicate   [more]


apply(?Term, ?Args)
The apply/2 higher-order predicate
apply_(?, ?, ?)
No description available

Other Exports

export syntax_option(var_functor_is_apply)


This library defines the apply/2 predicate which constructs a goal from a term and a list of additional arguments:
    	?- P=plus(1), apply(P, [3,X]).
	P = plus(1)
	X = 4
	Yes (0.00s cpu)
Loading this library also enables the syntax option var_functor_is_apply. This means that it is allowed to write terms with variables functors, which will be parsed as apply/2 terms which can the be executed. The above example can thus be written as:
    	?- P=plus(1), P(3,X).
	P = plus(1)
	X = 4
	Yes (0.00s cpu)


Generated from apply.eci on 2022-04-24 18:55