99 Elm Problems/Problem 9/Solutions

Solution 1: Recursive version