ideas-1.7: Feedback services for intelligent tutoring systems

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

Ideas.Common.Strategy.CyclicTree

Contents

Description

 

Synopsis

Data type

data CyclicTree a b Source #

Instances

BiFunctor CyclicTree Source # 

Methods

biMap :: (a -> c) -> (b -> d) -> CyclicTree a b -> CyclicTree c d Source #

mapFirst :: (a -> b) -> CyclicTree a c -> CyclicTree b c Source #

mapSecond :: (b -> c) -> CyclicTree a b -> CyclicTree a c Source #

Monad (CyclicTree d) Source # 

Methods

(>>=) :: CyclicTree d a -> (a -> CyclicTree d b) -> CyclicTree d b #

(>>) :: CyclicTree d a -> CyclicTree d b -> CyclicTree d b #

return :: a -> CyclicTree d a #

fail :: String -> CyclicTree d a #

Functor (CyclicTree d) Source # 

Methods

fmap :: (a -> b) -> CyclicTree d a -> CyclicTree d b #

(<$) :: a -> CyclicTree d b -> CyclicTree d a #

Applicative (CyclicTree d) Source # 

Methods

pure :: a -> CyclicTree d a #

(<*>) :: CyclicTree d (a -> b) -> CyclicTree d a -> CyclicTree d b #

liftA2 :: (a -> b -> c) -> CyclicTree d a -> CyclicTree d b -> CyclicTree d c #

(*>) :: CyclicTree d a -> CyclicTree d b -> CyclicTree d b #

(<*) :: CyclicTree d a -> CyclicTree d b -> CyclicTree d a #

Foldable (CyclicTree d) Source # 

Methods

fold :: Monoid m => CyclicTree d m -> m #

foldMap :: Monoid m => (a -> m) -> CyclicTree d a -> m #

foldr :: (a -> b -> b) -> b -> CyclicTree d a -> b #

foldr' :: (a -> b -> b) -> b -> CyclicTree d a -> b #

foldl :: (b -> a -> b) -> b -> CyclicTree d a -> b #

foldl' :: (b -> a -> b) -> b -> CyclicTree d a -> b #

foldr1 :: (a -> a -> a) -> CyclicTree d a -> a #

foldl1 :: (a -> a -> a) -> CyclicTree d a -> a #

toList :: CyclicTree d a -> [a] #

null :: CyclicTree d a -> Bool #

length :: CyclicTree d a -> Int #

elem :: Eq a => a -> CyclicTree d a -> Bool #

maximum :: Ord a => CyclicTree d a -> a #

minimum :: Ord a => CyclicTree d a -> a #

sum :: Num a => CyclicTree d a -> a #

product :: Num a => CyclicTree d a -> a #

Traversable (CyclicTree d) Source # 

Methods

traverse :: Applicative f => (a -> f b) -> CyclicTree d a -> f (CyclicTree d b) #

sequenceA :: Applicative f => CyclicTree d (f a) -> f (CyclicTree d a) #

mapM :: Monad m => (a -> m b) -> CyclicTree d a -> m (CyclicTree d b) #

sequence :: Monad m => CyclicTree d (m a) -> m (CyclicTree d a) #

(Show a, Show b) => Show (CyclicTree a b) Source # 

Methods

showsPrec :: Int -> CyclicTree a b -> ShowS #

show :: CyclicTree a b -> String #

showList :: [CyclicTree a b] -> ShowS #

(Arbitrary a, Arbitrary b) => Arbitrary (CyclicTree a b) Source # 

Methods

arbitrary :: Gen (CyclicTree a b) #

shrink :: CyclicTree a b -> [CyclicTree a b] #

Fix (CyclicTree a b) Source # 

Methods

fix :: (CyclicTree a b -> CyclicTree a b) -> CyclicTree a b Source #

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 #