(rule, fns=basic_fns)
return chain(lambda expr: sall(bottom_up(rule, fns), fns)(expr), rule)
Apply a rule down a tree running it on the bottom nodes first
Apply a rule down a tree running it on the bottom nodes first
Apply a rule down a tree running it on the bottom nodes first
def bottom_up(rule, fns=basic_fns):
    """ Apply a rule down a tree running it on the bottom nodes first """
    return chain(lambda expr: sall(bottom_up(rule, fns), fns)(expr), rule)
def bottom_up ( rule , fns = basic_fns ) : return chain ( lambda expr : sall ( bottom_up ( rule , fns ) , fns ) ( expr ) , rule )