This package implements Heinrich Apfelmus’s “merge shuffle” algorithm from his blog post Random Permutations and Sorting.
This version of the algorithm produces a uniform shuffle of the list with a single traversal.
Functional list shuffling with Heinrich Apfelmus's “merge shuffle” algorithm
This package implements Heinrich Apfelmus’s “merge shuffle” algorithm from his blog post Random Permutations and Sorting.
This version of the algorithm produces a uniform shuffle of the list with a single traversal.
Functional list shuffling with Heinrich Apfelmus's “merge shuffle” algorithm
BSD 3-Clause "New" or "Revised" License