Elixir Language See documentation with `h`


Example

iex(1)> h List.last

                                 def last(list)

Returns the last element in list or nil if list is empty.

Examples

┃ iex> List.last([])
┃ nil
┃
┃ iex> List.last([1])
┃ 1
┃
┃ iex> List.last([1, 2, 3])
┃ 3