triqs.gfs.lazy_expressions.transform
- triqs.gfs.lazy_expressions.transform(expr, Fnode, Fterm=<function <lambda>>)[source]
Recursively map
Fnode/Ftermover a lazy expression.- Parameters:
- exprLazyExpr
Expression to rewrite.
- Fnodecallable
Fnode(tag, childs) -> (tag, childs)applied at every non-terminal node.- Ftermcallable, optional
Fterm(value) -> valueapplied at every terminal. Default is the identity.
- Returns:
- LazyExpr
A new tree obtained by applying the rewrites bottom-up.