https://blog.firedrake.org/archive/2021/08/Perl_Weekly_Challenge_126__Count_Sweeper.html