's improvements on my human.pl, plus adding one improvement on your strategy we get to 94 characters:
Incidentally nice work on the select and shuffle problems. Marginally less efficient than my solution, but a lot shorter. (Well technically your solution is quadratic, but the quadratic bit has a small constant.)