rebol/rebol — pull request #217 by earl (2014-04-05 22:35:57+00:00)
Title: Add PAIR! support for REPEAT

This change allows PAIR! values as value argument of REPEAT. This
enables convenient traversal over a 2D space:

>> repeat p 3x3 [print p]
1x1
2x1
3x1
1x2
2x2
3x2
1x3
2x3
3x3

Similar to REPEAT over decimals, REPEAT over pairs implies a start of
1.0x1.0 and a default bump of 1.0x1.0. The first pair component ("X") is
varied first, which is in line with pair!-based indexing into image!s.

For the sake of completeness, PAIR! support is also enabled in the
legacy C-style FOR:

>> for p 10x10 15x20 5x5 [print p]
10x10
15x10
10x15
15x15
10x20
15x20

>> for p 3x1 1x2 -1x1 [print p]
3x1
2x1
1x1
3x2
2x2
1x2

This implements [CureCode wish #1995](http://issue.cc/r3/1995).