begin re-write in (Poly-)ML
mostly finish ml re-write
fix to_tree, clarify growth paths with types
remove implementation details from public signature