let get_root = fun d_tree -> match d_tree with
                        | End d -> d
                        | Tree (d, branches) -> d