acme-circular-containers-0.1.0.0: Spineless containers which are fast to read but inefficient to update

Safe HaskellSafe
LanguageHaskell2010

Data.Sequence.Circular

Synopsis

Documentation

type Seq a = Maybe (NonEmptySeq a) Source #

A variant of Seq in which we can walk from the outside in, as usual, but also from the inside out.

data NonEmptySeq a Source #

A doubly-linked list.

Sequences are not typically represented this way because the cycles between each node and its neighbours mean that any change to the sequence requires reallocating all of its node, not just the path from the closest end to the modified element. For this reason, we do not offer any update operations.

Constructors

NonEmptySeq 

Fields

data SeqNode a Source #

Constructors

SeqNode 

freeze :: forall a. Seq a -> Seq a Source #

freeze :: Data.Sequence.Seq a
       -> Data.Sequence.Circular.Seq a

O(n)

thaw :: forall a. Seq a -> Seq a Source #

Returns the elements at and to the right of the given SeqNode.

thaw :: Data.Sequence.Circular.Seq a
     -> Data.Sequence.Seq a

O(n)