next | previous | forward | backward | up | top | index | toc | home

Option -- the class of all pairs x => y

Description

Such pairs are used as optional arguments for functions. There is also a way to make new hash tables with new by providing a list of option pairs.

i1 : a => 5

o1 = a => 5

o1 : Option
i2 : peek (a => 5)

o2 = Option{a, 5}
i3 : new HashTable from {a => 5, b => 7}

o3 = HashTable{a => 5}
               b => 7

o3 : HashTable

These pairs are implemented as lists, so that if z is x => y, then x is z#0 and y is z#1.

See also

Functions and methods returning an option :

Methods that use an option :

For the programmer

The object Option is a type, with ancestor classes BasicList < Thing.