Write while loop equivalent in elixir

You’re right, I always forget that you can just leave a function empty and it won’t cause an error.