Is this a bug in the Enum.to_list function?

This is not a bug. What you see is called a charlist - a list of integers interpreted as text.

You can find more info here:

https://hexdocs.pm/elixir/List.html#module-charlists

5 Likes