It took me a while to work out what you were getting at here. I'd call this interleave, not shuffle. The two arrays as arguments are a blind: they may or may not have the same number of elements. If warnings are active, they should add to an even number of elements.
This is terribly obfuscated, if it works at all. What exactly do you mean it to do?
Update: The Storm King reminds me that 'perfect shuffle' is the term for a uniform distribution of order. Not what your function produces.
After Compline,
Zaxo
In reply to Re: perfect shuffle
by Zaxo
in thread interleave (single shuffle)
by ysth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |