Refactoring nested conditionals in Elixir | Hacker News Reader