ZVON > References > Haskell reference
| Indexes | Syntax | Prelude | Ratio | Complex | Numeric | Ix | Array | >> List << | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random

Module: List
Function: tails
Type: [a] -> [[a]]
Description: returns the list of initial segments of its argument list, shortest last
Related: group, groupBy, inits, intersperse, mapAccumL, mapAccumR, nub, nubBy, partition, sort, sortBy, transpose

Example 1

Input: tails [1,3,5]

Output: [[1,3,5],[3,5],[5],[]]

Example 2

Input: tails "XXX"

Output: ["XXX","XX","X",""]