object
optional¶
Constructors for optional term references. A reference is either empty or holds a term. References should be regarded as opaque terms and always used with the optional/1 object by passing the reference as a parameter.
Author: Paulo Moura
Version: 1.4
Date: 2019/1/23
Compilation flags:
static, context_switching_callsProvides:
Remarks:
Type-checking support: This object also defines a type
optionalfor use with thetypelibrary object.
Public predicates¶
empty/1¶
Constructs an empty reference.
Compilation flags:
staticTemplate:
empty(Reference)Mode and number of proofs:
empty(--nonvar) - oneof/2¶
Constructs a reference holding a term.
Compilation flags:
staticTemplate:
of(Term,Reference)Mode and number of proofs:
of(@term,--nonvar) - onefrom_goal/3¶
Constructs a reference by calling Goal that binds and holds Term on success. Returns an empty reference if the goal fails or throws an error.
Compilation flags:
staticTemplate:
from_goal(Goal,Term,Reference)Meta-predicate template:
from_goal(0,*,*)Mode and number of proofs:
from_goal(+callable,--term,--nonvar) - oneProtected predicates¶
(see entity ancestors)
Private predicates¶
(see entity ancestors)