object

# maybe

> Types and predicates for type-checking and handling optionals. Inspired by Haskell.

author:
  `Paulo Moura`
version:
  `0.3`
date:
  `2017/12/18`

compilation flags:
  `static, context_switching_calls`

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

## Public interface

### cat/2

> Returns the values stored in the non-empty optionals.

compilation flags:
  `static`
template:
  `cat(Optionals,Values)`
mode – number of proofs:
  `cat(+list(optional),-list) – one`

## Protected interface

(see related entities)

## Private predicates

(see related entities)

## Operators

### (none)

## Remarks

Type maybe(Type)
  Allows type-checking optional 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.

## See also

- optional
- optional(Reference)
- type
- arbitrary