object
optional¶
Constructors for optional terms. An optional term is either empty or holds a value. Optional terms should be regarded as opaque terms and always used with the optional/1 object by passing the optional term as a parameter.
static, context_switching_calls
Type-checking support: This object also defines a type
optionalfor use with thetypelibrary object.
Public predicates¶
empty/1¶
Constructs an empty optional term.
staticempty(Optional)empty(--nonvar) - oneof/2¶
Constructs an optional term holding the given value.
staticof(Value,Optional)of(@term,--nonvar) - onefrom_goal/3¶
Constructs an optional term holding a value bound by calling the given goal. Returns an empty optional term if the goal fails or throws an error.
staticfrom_goal(Goal,Value,Optional)from_goal(0,*,*)from_goal(+callable,--term,--nonvar) - onefrom_goal/2¶
Constructs an optional term holding a value bound by calling the given closure. Returns an empty optional term if the closure fails or throws an error.
staticfrom_goal(Closure,Optional)from_goal(1,*)from_goal(+callable,--nonvar) - onefrom_generator/3¶
Constructs optional terms with the values generated by calling the given goal. On goal error or failure, returns an empty optional.
staticfrom_generator(Goal,Value,Optional)from_generator(0,*,*)from_generator(+callable,--term,--nonvar) - one_or_morefrom_generator/2¶
Constructs optional terms with the values generated by calling the given closure. On closure error or failure, returns an empty optional.
staticfrom_generator(Closure,Optional)from_generator(1,*)from_generator(+from_generator,--nonvar) - one_or_moreProtected predicates¶
(no local declarations; see entity ancestors if any)
Private predicates¶
(no local declarations; see entity ancestors if any)