ideas-1.5: Feedback services for intelligent tutoring systems

Maintainerbastiaan.heeren@ou.nl
Stabilityprovisional
Portabilityportable (depends on ghc)
Safe HaskellNone
LanguageHaskell98

Ideas.Common.CyclicTree

Contents

Description

 

Synopsis

Data type

Constructor functions

node :: a -> [CyclicTree a b] -> CyclicTree a b Source

node0 :: a -> CyclicTree a b Source

node1 :: a -> CyclicTree a b -> CyclicTree a b Source

node2 :: a -> CyclicTree a b -> CyclicTree a b -> CyclicTree a b Source

leaf :: b -> CyclicTree a b Source

label :: IsId n => n -> CyclicTree a b -> CyclicTree a b Source

Querying

isNode :: CyclicTree a b -> Maybe (a, [CyclicTree a b]) Source

Replace functions

replaceNode :: (a -> [CyclicTree a b] -> CyclicTree a b) -> CyclicTree a b -> CyclicTree a b Source

replaceLeaf :: (b -> CyclicTree a c) -> CyclicTree a b -> CyclicTree a c Source

Fold and algebra

fold :: CyclicTreeAlg a b t -> CyclicTree a b -> t Source

fNode :: CyclicTreeAlg a b t -> a -> [t] -> t Source

fLeaf :: CyclicTreeAlg a b t -> b -> t Source

fLabel :: CyclicTreeAlg a b t -> Id -> t -> t Source

fRec :: CyclicTreeAlg a b t -> Int -> t -> t Source

fVar :: CyclicTreeAlg a b t -> Int -> t Source