inits -glut

inits :: [a] -> [[a]]
base Data.List
The inits function returns all initial segments of the argument, shortest first. For example, > inits "abc" == ["","a","ab","abc"]
inits :: ByteString -> [ByteString]
bytestring Data.ByteString, bytestring Data.ByteString.Char8, bytestring Data.ByteString.Lazy, bytestring Data.ByteString.Lazy.Char8
O(n) Return all initial segments of the given ByteString, shortest first.
inits :: Seq a -> Seq (Seq a)
containers Data.Sequence
O(n). Returns a sequence of all prefixes of this sequence, shortest first. For example, > inits (fromList "abc") = fromList [fromList "", fromList "a", fromList "ab", fromList "abc"] Evaluating the ith prefix takes O(log(min(i, n-i))), but evaluating every prefix in the sequence takes O(n) due to sharing.
inits :: Text -> [Text]
text Data.Text, text Data.Text.Lazy
O(n) Return all initial segments of the given Text, shortest first.