Tracing of Func and Lazy evaluations
The function trace can be used to trace evaluation of expressions:
trace(lambda: expr)returns a tuple consisting of the result of evaluatingexprand a (printable) trace of all evaluation steps.The optional boolean parameter
livecan be used to enable “live tracing”, where evaluation steps are printed tostdoutas they happen.The optional parameter
skip_stepscan be used to suppress selected set of tracing steps. For example, settingskip_steps = {DefinitionStep}suppresses function definition steps in the trace.