BranchLabelingSyntax
Syntax for labeling or creating new branches in a log tree given a description.
Value members
Concrete methods
Create a new branch given a monadic, traversable 'container' F[DescribedComputation[Value]]
, 'sequence' it
to create a DescribedComputation[F[Value]]
, and give the new DescribedComputation's
log tree a
new root node, with the given description
and whose children are the trees in the
F[DescribedComputation[Value]]
.
Create a new branch given a monadic, traversable 'container' F[DescribedComputation[Value]]
, 'sequence' it
to create a DescribedComputation[F[Value]]
, and give the new DescribedComputation's
log tree a
new root node, with the given description
and whose children are the trees in the
F[DescribedComputation[Value]]
.
For example, if we evaluate this method with F
instantiated as List
, we would turn a
List[DescribedComputation[Value]]
into a DescribedComputation[List[Value]]
, such that the
List[Value]
which is the result's 'value' is obtained by extracting the 'value' from each
treelog.LogTreeSyntax.DescribedComputation in the describedComputations
parameter. Likewise, the child nodes
of the returned log tree root node are obtained by extracting the log tree from each of the describedComputations
.
The ''success'' status of the returned DescribedComputations
log tree is true
if all of the children
are successful. It is false
otherwise.
If dc
has a log tree with an undescribed root node, give the root node the description
but otherwise
leave it unchanged. If the log tree has a described root node, create a new root node above the existing one and give the
new root node the description
. In both cases preserve the value
and success/failure status.
If dc
has a log tree with an undescribed root node, give the root node the description
but otherwise
leave it unchanged. If the log tree has a described root node, create a new root node above the existing one and give the
new root node the description
. In both cases preserve the value
and success/failure status.
As ~< but folding over the resulting F[Value] to yield R and return a DescribedComputation[R] with all the logs.
As ~< but folding over the resulting F[Value] to yield R and return a DescribedComputation[R] with all the logs.
For example, given l = List[DescribedComputation[Int]], and f = List[Int] => Int (say summing the list), then
"Sum" ~<+(l, f)
would return a DescribedComputation containing the sum of the elements of the list.