tree {hedgehog} | R Documentation |
Lazy rose trees
Description
A rose tree is a type of multibranch tree. This is hedgehog's internal implementation of a lazy rose tree.
Usage
tree(root, children_ = list())
tree.map(f, x)
tree.bind(f, x)
tree.liftA2(f, x, y)
tree.expand(shrink, x)
tree.unfold(shrink, a)
tree.unfoldForest(shrink, a)
tree.sequence(trees)
Arguments
root |
the root of the rose tree |
children_ |
a list of children for the tree. |
f |
a function for mapping, binding, or applying |
x |
a tree to map or bind over |
y |
a tree to map or bind over |
shrink |
a shrinking function |
a |
a value to unfold from |
trees |
a tree, or list or structure potentially containing trees to turn into a tree of said structure. |
Details
In general, one should not be required to use any of the functions from this module as the combinators in the gen module should be expressive enough (if they're not raise an issue).
[Package hedgehog version 0.1 Index]