reducing tree: consolidate funcdef