Skip to content

Instantly share code, notes, and snippets.

@tmlbl
Last active August 29, 2015 14:22
Show Gist options
  • Save tmlbl/a6541e33b094c463f63c to your computer and use it in GitHub Desktop.
Save tmlbl/a6541e33b094c463f63c to your computer and use it in GitHub Desktop.
Macro problems
macro stringall(msg...)
return :(join(map((i) -> string(eval(i)), $msg), " "))
end
x = "foo"
function test()
x = "bar"
global y = "baz"
@stringall x y
end
@assert test()=="bar baz" # fails: returns "foo baz"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment