better treeFold - i.e. idiomatic/standard.