treeF :: Tree (a, F b c) -> F (Path, b) (a, c) data Tree a = Leaf a | Branch (Tree a) (Tree a) instance Eq a => Eq (Tree a) instance Ord a => Ord (Tree a) instance (Show leaf, Show node) => Show (Tree leaf node)
treeF tagged_fudgets
type Path = [Direction]
treeF
operate in parallel, indepdenetly of one
another. The high level output streams from the individual
fudgets are tagged and merged into a single stream. The input stream,
which must be tagged, is split up and fed to the appropriate fudget.
(path,msg)
is sent to the fudget at the position in
the tree indicated by path
.
(tag,msg)
comes from the fudget tagged tag
.
tagged_fudgets :: Tree (a, F b c)