reaction-logic-2010.11.17: pluggable pure logic serializable reactor

Data.Reactor.Pruned

Synopsis

Documentation

mkPrunedSource

Arguments

:: Monad m 
=> (a -> m (a, [a]))

monadic value expansion, first value is the update , second values are dependents

-> (a -> Bool)

pruning condition

-> (a -> b -> a)

restoring function via parameter

-> (a -> b)

serialization to parameter

-> a

value for the base node

-> Pruned m b

the pruned object

build a pruned given some functions and a value

data Pruned m b Source

A pruned object keeps a pruned tree of values

Constructors

Pruned 

Fields

expand :: m (Maybe (Pruned m b))

expand the pruned , Nothing if nothing in it at the end

serialize :: [b]

collect the pruned values

restore :: [b] -> Pruned m b

restore the pruned given it's values