Last active
September 25, 2020 16:50
-
-
Save xrq-phys/e83e1a98929e6a0061d77b41af14de73 to your computer and use it in GitHub Desktop.
Revisions
-
xrq-phys revised this gist
Sep 25, 2020 . No changes.There are no files selected for viewing
-
xrq-phys created this gist
Sep 25, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ module BatchDef macro def_numed_fun(funname, num) numed_funname = Symbol(string(funname, num)) @show numed_funname return quote $(esc(numed_funname))() = $num end end @def_numed_fun("testfun", 1); @def_numed_fun("testfun", 2); @def_numed_fun("testfun", 3); end