object

# `maybe`

Types and predicates for type-checking and handling optional term references. Inspired by Haskell.

Author: Paulo Moura
Version: 0.5
Date: 2019/1/24
Compilation flags:
`static, context_switching_calls`
Provides:
type::type/1
type::check/2
arbitrary::arbitrary/1
arbitrary::arbitrary/2
Uses:
optional
optional(Reference)
random
type
Remarks:

> - Type-checking support: Defines type `maybe(Type)` for checking optional term references where the optional term must be of the given type.

> - QuickCheck support: Defines clauses for the `arbitrary::arbitrary/1-2` predicates to allow generating random values for the maybe(Type) type.

- Public predicates

  - `cat/2`

- Protected predicates

- Private predicates

- Operators

## Public predicates

### `cat/2`

Returns the terms stored in the non-empty references.

Compilation flags:
`static`
Template:
`cat(References,Values)`
Mode and number of proofs:
`cat(+list(optional),-list)` - `one`

## Protected predicates

(see entity ancestors)

## Private predicates

(see entity ancestors)

## Operators

(none)

See also

optional, optional(Reference), type, arbitrary