Problem 22 done.
This was quite an enjoyable tour around the standard library, especially
when it came to passing interfaces around. The if statement in the inner
loop feels misplaced but it works I geuss.