Card shuffles: Difference between revisions

Content added Content deleted
Line 1,142: Line 1,142:
def iterations: 10;
def iterations: 10;


"Starting deck:",
deck
| "Starting deck:",
"Riffle shuffle with \(iterations) iterations:",
riffle(deck; iterations),
"Riffle shuffle with \(iterations) iterations:",
"\nOverhand shuffle with \(iterations) iterations:",
riffle(iterations),
"\nOverhand shuffle with \(iterations) iterations:",
overhand(deck; iterations),
overhand(iterations),
"\nStandard library shuffle with 1 iteration:",
"\nStandard library shuffle with 1 iteration:",
(deck | knuthShuffle) # shuffles deck in place
knuthShuffle
</syntaxhighlight>
</syntaxhighlight>
{{output}}
{{output}}