[32] prettier solution, with cond
[32] pattern match solution
[32] typed solution, function with 2 args is annoying
[33] rename because I renamed 32
[34] recursive and stream-fold solutions