Here's a shuffler. From the moment you see it, how long does it take till you
realize what pattern it's executing?
abcdef-cbedaf
The pattern recognition process is much faster with this expression:
<[=-=-=-]
Here's another one:
abcdefg-gbedcfa
The equivalent reshaper:
r[=-=-=-=]
The r[...] form "reverses" the marked elements.
Ed
william wrote:
> There's a huge difference between shuffles (which are countable and
> always terminate) and quotations with locals (which are
> Turing-complete). Both have their places, but let me put it this way:
> if you were writing phrases like "-roll 3drop" in your code, would you
> rather code that as "s[abcd--d]" or "[|a b c d| d] call"? The former
> can be read as a single gestalt; the latter has to be mentally checked
> to make sure it's not executing anything.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk