99 Elm Problems/Problem 8/Solutions

Solution 1: Recursive version