init package:mono-traversable

Safe version of initEx, only working on non-nullable sequences.
like Data.List.init, but an input of mempty returns mempty
Unsafe Get the init of a sequence, throw an exception if the sequence is empty.
> initEx [1,2,3]
[1,2]
Safe version of initEx. Returns Nothing instead of throwing an exception when encountering an empty monomorphic container.
Return all the pairs of inital and final segments of seq.
> initTails [1,2]
[([],[1,2]),([1],[2]),([1,2],[])]
> initTails []
[([],[])]
Return all the initial segments of seq with the shortest first.
> inits [1,2]
[[],[1],[1,2]]
> inits []
[[]]
Equivalent to initEx.