tails

trait Collection[A] {
  def tails: Iterator[Collection[A]]
}

tails computes all possible suffixes of this collection and returns an Iterator to iterate them.