
Weaves 739
Block Expressions
Block expressions may be used in an interleaved format. This is particularly useful for
color sequences like those used in the Scottish tartan plaids. For example, one of the
Drummond color sequences is expressed as follows:
[G 8 R 2 G 2 R 56 G 16 B 2 G 2 B 2 G 36 R 2 G 2 R 8|].
REPEAT
The left operand is a pattern of any length. The right operand is an integer count. The
expansion is the <pattern> repeated <count> times.
EXTEND
The left operand is a pattern of any length. The right operand is an integer that is
interpreted as a length. The left operand is reshaped to be the length as specified by the
right operand. If the left operand is shorter that the desired length, it is repeated out to
the right length. If the left operand is shorter, it is merely trimmed.
Example Expansion
1234 [] 2 11223344
34512 [] 23 334445511122
12345678 [] 87654321 111111112222222333333444445555666778
12 [] 123494321 12211122221111111112222111221
123 [] 1{12}3 1222222222222333
Operator usage Short form
<pattern> repeat <count> rep, *
Example Expansion
1234567 repeat 3 123456712345671234567
Operator usage Short form
<pattern> extend <count> ext, ->
Comentarios a estos manuales