Description Usage Arguments Details Value
Applies a function to tree leaves only.
1 | tree_apply(tree, leaf_def, action_def)
|
leaf_def |
function which takes a node and returns TRUE only if the node is a leaf. |
action_def |
function to run on each leaf node. |
x |
the tree-shaped list |
In this terminology a tree is a multi-level list, not necessarily balanced, and each tree branch ends in a node which is defined _only_ by the 'leaf_def' function. At each leaf the 'action_def' function is applied.
a list matching the tree structure and each node processed by the provided function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.