Kernel.tl
You're seeing just the function
tl
, go back to Kernel module for more information.
Specs
tl(nonempty_maybe_improper_list(elem, tail)) :: maybe_improper_list(elem, tail) | tail when elem: term(), tail: term()
Returns the tail of a list. Raises ArgumentError
if the list is empty.
It works with improper lists.
Allowed in guard tests. Inlined by the compiler.
Examples
tl([1, 2, 3, :go])
#=> [2, 3, :go]
tl([:one])
#=> []
tl([:a, :b | :c])
#=> [:b | :c]
tl([:a | %{b: 1}])
#=> %{b: 1}
Giving it an empty list raises:
tl([])
#=> ** (ArgumentError) argument error