Hey @bananaphone welcome! Good news! It’s returning the right thing, it’s just presented in a confusing way. Binaries, strings, and charlists - The Elixir programming language
Basically, to maintain compatibility with Erlang, when a list contains only integers and those integers are printable, it is displayed as text with the ~c"text here"
syntax. That is just a display thing, it is still a list:
iex(4)> [7] == ~c"\a"
true
I believe there is an option you can set to always display charlists as lists, let me see if I can find that.