Skip to content

Instantly share code, notes, and snippets.

Last active November 6, 2019 11:01
What would you like to do?
Evaluate a function with given parameters
macro eval_with_params(expr, params...)
# Put the params before the expression
expr_with_params = [collect(params)..., expr]
# Wrap the expressions in :block Expressions
Expr(:block, expr_with_params...)
x + y,
x = 1,
y = 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment