:: [a] -> [[a]] package:numeric-prelude

List.inits is defined by inits = foldr (x ys -> [] : map (x:) ys) [[]] This is too strict for our application.
Prelude> List.inits (0:1:2:undefined)
[[],[0],[0,1]*** Exception: Prelude.undefined
The following routine is more lazy than inits and even lazier than inits from utility-ht package, but it is restricted to infinite lists. This degree of laziness is needed for sqrtFP.
Prelude> lazyInits (0:1:2:undefined)
[[],[0],[0,1],[0,1,2],[0,1,2,*** Exception: Prelude.undefined