tails package:containers

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 <math>th suffix takes <math>, but evaluating every suffix in the sequence takes <math> due to sharing.