tails package:rio

O(n) Return all final segments of the given ByteString, longest first.
The tails function returns all final segments of the argument, longest first. For example,
>>> tails "abc"
["abc","bc","c",""]
Note that tails has the following strictness property: tails _|_ = _|_ : _|_
The tails function takes a stream xs and returns all the suffixes of xs.
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.
O(n) Return all final segments of the given Text, longest first.