Added a function tails which takes a collection and creates a collection of collections successively smaller than the initial collection