tail of a list in Elixir

61 Views Asked by At

I'm just learning Elixir, and I understand that a list - like in i.e. LISP - contains of a head and a tail. For instance, the list [1,2,3] has head 1 and tail [2,3].

So when I do a tl ["b", 8] in the interactive Elixir command line, I would expect [8] as answer. However, my iex produces in this case

iex(45)> tl ["b", 8]
~c"\b"

Why do I get this result, and what does it mean?

BTW, the same happens when I explicitly type :erlang.tl ["b", 8].

0

There are 0 best solutions below