This module contains a type,
Seq, much like that from
but which is guaranteed to contain at least one element.
This module is intended to be imported qualified, to avoid name clashes or ambiguity. For example:
import Data.Sequence.NonEmpty as NonEmpty
data Seq a
A sequence which is guaranteed to contain at least one element.
O(log(min(i,n-i))). Split the sequence into two (possibly empty) subsequences. The first subsequence will have i elements (unless there are not that many in the whole sequence, in which case the first element is the same sequence, unchanged).