Strange output iex

I tried the below code on the elixir interactive shell and had an unexpected output. I assume there’s something wrong with the second code, Kindly advise.

iex(5)> Enum.map([{1, 2}, {3, 4}], fn({x, _y}) -> x end)
[1, 3]

iex(6)> Enum.map([{40, 6}, {50, 12}], fn({x, _y}) -> x end)
‘(2’

iex(1)> Enum.map([{40, 6}, {50, 12}], fn({x, _y}) -> x end) |> IO.inspect(charlists: :as_lists)
[40, 50]
'(2'
iex(1)>

Charlists

2 Likes
iex> [40, 50]
'(2'
iex> [65, 66, 67]
'ABC'
2 Likes

Thanks a lot @peerreynders and @kokolegorille. It does make sense, I’m a newbie.