tails package:nonempty-containers

Returns a sequence of all non-empty suffixes of this sequence, longest first. For example,
tails (fromList (1:|[2,3])) = fromList (fromList (1:|[2,3]) :| [fromList (2:|[3]), fromList (3:|[])])
Evaluating the <math>th suffix takes <math>, but evaluating every suffix in the sequence takes <math> due to sharing.