diff --git a/impls/cs/step8_macros.cs b/impls/cs/step8_macros.cs index 9e111dd6..30e040be 100644 --- a/impls/cs/step8_macros.cs +++ b/impls/cs/step8_macros.cs @@ -162,6 +162,7 @@ namespace Mal { a1 = ast[1]; a2 = ast[2]; res = EVAL(a2, env); + res = res.copy(); ((MalFunc)res).setMacro(); env.set(((MalSymbol)a1), res); return res; diff --git a/impls/cs/step9_try.cs b/impls/cs/step9_try.cs index ba7b6dc9..31dab06c 100644 --- a/impls/cs/step9_try.cs +++ b/impls/cs/step9_try.cs @@ -162,6 +162,7 @@ namespace Mal { a1 = ast[1]; a2 = ast[2]; res = EVAL(a2, env); + res = res.copy(); ((MalFunc)res).setMacro(); env.set(((MalSymbol)a1), res); return res; diff --git a/impls/cs/stepA_mal.cs b/impls/cs/stepA_mal.cs index 56f3da09..cdc14901 100644 --- a/impls/cs/stepA_mal.cs +++ b/impls/cs/stepA_mal.cs @@ -162,6 +162,7 @@ namespace Mal { a1 = ast[1]; a2 = ast[2]; res = EVAL(a2, env); + res = res.copy(); ((MalFunc)res).setMacro(); env.set(((MalSymbol)a1), res); return res;