Refactor palindrome products example for elixir

Based on comments in #1152