[ Reference Manual | Alphabetic Index ]

# library(apply)

The apply/2 higher-order predicate [more]

## Predicates

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

## Other Exports

> export syntax_option(var_functor_is_apply)

## Description

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)

## About

- Author: Joachim Schimpf, ECRC Munich
- Copyright © Cisco Systems, Inc
- Date: $Date: 2009/07/16 09:11:24 $

Generated from apply.eci on 2022-09-03 14:26