It'll take a little more than that.
It will need to remember the direction in which the numbers are running, otherwise 1,2,1,2,3,2,3,4,3... will be seen as a run.
In reply to Re^3: Adjacent numbers
by BrowserUk
in thread Adjacent numbers
by melissa_randel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |