Ravelling

Meaning

Algol 68 unions are both commutative and associative. The associativity implies that, for example, given the declaration:

mode u1 = union (int,real);

Then writing union (u1,string) results in the mode union (int,real,string). This associativity, which is conceptually clear, is syntactically implemented by an operation known as ravelling and consists in that, given a set of modes, some of them united, the united modes in the set are replaced by their components.

Syntax

Simplified [RR 4.7.1] is a predicate that determines whether a given set of moids ravels to a set of moods:

g) WHETHER MOIDS ravels to MOODS:
     where (MOIDS) is (MOODS), WHETHER true ;
     where (MOIDS) is
           (MOODSETY union of MOODS1 mode MOIDSETY),
       WHERE MOODSETY MOODS1 MOIDSETY ravels to MOODS.

See Also