nested-sets-0.0.1.1: Nested set model implementation

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.NestedSet

Synopsis

Documentation

data NestedSetsNode a Source

Constructors

NestedSetsNode 

Instances

forestToNestedSets :: Forest a -> NestedSets a Source

Convert forest to nested sets This function is the opposite of nestedSetsToForest

nestedSetsToForest :: NestedSets a -> Forest a Source

Convert nested sets to forest. This function is the opposite of forestToNestedSets

nestedSetsStartPosition :: NestedSets a -> Maybe Position Source

Retrieve the starting position (iterator) of the nested set.

nestedSetsNextSiblingPosition :: NestedSets a -> Position -> Maybe Position Source

Advance the given position to the next sibling.

nestedSetsParentPosition :: NestedSets a -> Position -> Maybe Position Source

Retrieve the position's parent position.

nestedSetsFirstChildPosition :: NestedSets a -> Position -> Maybe Position Source

Advance the position to the first child node.

nestedSetsPositionValue :: NestedSets a -> Position -> Maybe a Source

Retrieve the value for the given Position.

nestedSetsPositionSetValue :: NestedSets a -> Position -> a -> NestedSets a Source

Set value for the Position on the given nested set. Does not modify the given NestedSets if the Position cannot be found.