99 Elm Problems/Problem 12/Solutions

Solution 1: Recursive version