Annotated even-arity trees backed by arbitrary memories.
toml
whistlinoak = "0.1"
```rust use whistlinoak::{Annotation, Tree};
struct Cardinality(usize);
impl
fn combine<'a>(annotations: impl Iterator<Item=&'a Self>) -> Self
where
Self: 'a
{
Self(annotations.fold(0, |curr, c| curr + c.0))
}
}
let mut tree = Tree::
let n_leaves = 1000;
for i in 0..n_leaves { tree.push(i).unwrap(); }
asserteq!(tree.len(), nleaves); asserteq!(tree.root().0, nleaves); ```