Tree : change the parameter of `expandTo` to a `predicate` function

more flexible