The
inits function returns all initial segments of the
argument, shortest first. For example,
>>> inits "abc"
["","a","ab","abc"]
Note that
inits has the following strictness property:
inits (xs ++ _|_) = inits xs ++ _|_
In particular,
inits _|_ = [] : _|_