Fox.ListExt

Source

Summary

head(xs)

returns everything except the last member of a list

tail(list)

returns everything except the first member of a list

Functions

head(xs)

Specs:

returns everything except the last member of a list

Examples

iex> [1,2,3] |> head
[1,2]
iex> [] |> head
[]
Source
tail(list)

Specs:

returns everything except the first member of a list

Examples

iex> [1,2,3] |> tail
[2,3]
Source