tails +containers

tails :: Seq a -> Seq (Seq a)
containers Data.Sequence
O(n). Returns a sequence of all suffixes of this sequence, longest first. For example, > tails (fromList "abc") = fromList [fromList "abc", fromList "bc", fromList "c", fromList ""] Evaluating the ith suffix takes O(log(min(i, n-i))), but evaluating every suffix in the sequence takes O(n) due to sharing.