Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- type Seq a = Maybe (NonEmptySeq a)
- data NonEmptySeq a = NonEmptySeq {}
- data SeqNode a = SeqNode {
- seqNodePrev :: Maybe (SeqNode a)
- seqNodeLabel :: a
- seqNodeNext :: Maybe (SeqNode a)
- freeze :: forall a. Seq a -> Seq a
- thaw :: forall a. Seq a -> Seq a
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.
SeqNode | |
|