triqs.gfs.lazy_expressions.eval_expr_with_context

triqs.gfs.lazy_expressions.eval_expr_with_context(eval_term, expr)[source]

Recursively reduce expr using eval_term on every leaf.

Parameters:
eval_termcallable

Called as eval_term(value) on each terminal payload to map it to a concrete value (e.g. a Gf produced by applying a descriptor to a fresh target).

exprLazyExpr

Expression tree to reduce.

Returns:
object

The numerical value of the expression after substitution and evaluation of binary operations and function applications.