object

# optional

> Constructors for optional term references. An optional reference represents a term that may or may not be present. Optional references should be regarded as opaque terms and always used with the "optional(_)" object by passing the reference as a parameter.

author:
  `Paulo Moura`
version:
  `1.2`
date:
  `2017/8/8`

compilation flags:
  `static, context_switching_calls`

provides:
  `type::type/1`
  `type::check/2`

## Public interface

### empty/1

> Constructs an empty optional reference.

compilation flags:
  `static`
template:
  `empty(Reference)`
mode – number of proofs:
  `empty(--nonvar) – one`

### of/2

> Constructs an optional reference from a term.

compilation flags:
  `static`
template:
  `of(Term,Reference)`
mode – number of proofs:
  `of(@term,--nonvar) – one`

## Protected interface

(see related entities)

## Private predicates

(see related entities)

## Operators

### (none)

## Remarks

Type-checking support
  This object also defines a type "optional" for use with the "type" library object.

## See also

- optional(Reference)
- type