99 Elm Problems/Problem 4/Solutions

Solution 1: Recursive version

Solution 2: Using