Logtalk predicate directive: mode/2

contents > reference manual > directives

## `mode/2`

#### Description

>     mode(Mode, Number_of_solutions)

> Most predicates can be used with several instantiations modes. This directive enables the specification of each instantiation mode and the corresponding number of solutions/proofs.

#### Template and modes

>     mode(+predicate_mode_term, +number_of_solutions)

#### Examples

>     :- mode(append(-, -, +), zero_or_more).

>     :- mode(append(+list, +list, -list), zero_or_one).

>     :- mode(var(@term), zero_or_one).

>     :- mode(arg(-, -, +), error).

previous | glossary | next
Copyright © Paulo Moura — Logtalk.org