nestedmap-0.1.0.3: A library for nested maps

Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Nested.Forest

Contents

Synopsis

Forest type

data Forest κ α Source

Instances

Functor (Forest κ) 
Foldable (Forest κ) 
Traversable (Forest κ) 
(Show κ, Show α) => Show (Forest κ α) 
(Ord κ, Monoid α) => Monoid (Forest κ α) 

Query

trees :: Forest κ α -> [Tree κ α] Source

treeAssocs :: Forest κ α -> [(κ, Tree κ α)] Source

null :: Forest κ α -> Bool Source

size :: Forest κ α -> Int Source

lookup :: (Traversable φ, Ord κ) => φ κ -> Forest κ α -> φ (Maybe α) Source

member :: (Traversable φ, Ord κ) => φ κ -> Forest κ α -> φ Bool Source

Construction

singleton :: Foldable φ => φ (κ, α) -> Forest κ α Source

fromFoldable :: (Foldable φ, Foldable ψ, Ord κ) => ψ (φ (κ, α)) -> Forest κ α Source

fromList :: Ord κ => [[(κ, α)]] -> Forest κ α Source

List

toList :: Forest κ α -> [[(κ, α)]] Source