def subs(d, **kwargs):
 if d:
  return top_down(do_one(*map(rl.subs, *zip(*d.items()))), **kwargs)
 else:
  return (lambda x: x)

def subs ( d , ** kwargs ) : if d : return top_down ( do_one ( * map ( rl . subs , * zip ( * d . items ( ) ) ) ) , ** kwargs ) else : return ( lambda x : x )
full simultaneous exact substitution examples .