Created
October 24, 2012 05:30
-
-
Save vtjnash/3944204 to your computer and use it in GitHub Desktop.
julia macro local variable expression
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
macro foo(ex) | |
quote | |
$(esc(ex)) | |
end | |
end | |
function f(x,y) | |
@foo x+y | |
end | |
@assert f(1,2) == 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment