added first, length, pop, rest and shift.
Same as previous commit, I forgot to commit from the repo root.
Added sanity checks to first and last functions.