object

# either

> Types and predicates for type-checking and handling expecteds.

author:
  `Paulo Moura`
version:
  `0.1`
date:
  `2017/12/26`

compilation flags:
  `static, context_switching_calls`

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

## Public interface

### expecteds/2

> Returns the values stored in the expcted references that hold an expected term.

compilation flags:
  `static`
template:
  `expecteds(References,Expecteds)`
mode – number of proofs:
  `expecteds(+list(expected),-list) – one`

### unexpecteds/2

> Returns the values stored in the expcted references that hold an expected term.

compilation flags:
  `static`
template:
  `unexpecteds(References,Unexpecteds)`
mode – number of proofs:
  `unexpecteds(+list(expected),-list) – one`

### partition/3

> Retrieves and partitions the values stored in the expcted references.

compilation flags:
  `static`
template:
  `partition(References,Expecteds,Unexpecteds)`
mode – number of proofs:
  `partition(+list(expected),-list,-list) – one`

## Protected interface

(see related entities)

## Private predicates

(see related entities)

## Operators

### (none)

## Remarks

Type either(ExpectedType, UnexpctedType)
  Allows type-checking expected references where the expected and unexpected terms must be of the given types.

QuickCheck support
  Defines clauses for the arbitrary::arbitrary/1-2 predicates to allow generating random values for the either(ExpectedType, UnexpctedType) type.

## See also

- expected
- expected(Reference)
- type
- arbitrary