The
tails function takes a stream
xs and returns all
the suffixes of
xs, starting with the longest. The result is
NonEmpty because the result always contains the empty list as
the last element.
tails [1,2,3] == [1,2,3] :| [[2,3], [3], []]
tails [1] == [1] :| [[]]
tails [] == [] :| []