(The for loop confused me.)
Ah, but it wasn't a for loop. It was a for aliasing. This can be a very useful technique, so you might want to get used to it. Granted, in this case, it was done to try to better meet the original request for 'an "elegant" 1-liner', and isn't the way I would usually write code (and not even the way I originally posted the code, before I noticed the quoted part of the original request).
- tye
In reply to Re^3: Elegant way to split into sequences of identical chars? (for)
by tye
in thread Elegant way to split into sequences of identical chars?
by pKai
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |