2016-04-26 12:51:14 -05:00
|
|
|
pub struct BTree<V> {
|
|
|
|
pub node: TreeItem<V>,
|
|
|
|
}
|
|
|
|
|
|
|
|
pub enum TreeItem<V> {
|
|
|
|
TreeLeaf { value: V },
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn leaf<V>(value: V) -> TreeItem<V> {
|
|
|
|
TreeItem::TreeLeaf { value: value }
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
BTree::<isize> { node: leaf(1) };
|
2015-03-18 16:05:24 -05:00
|
|
|
}
|