Skip to content

Instantly share code, notes, and snippets.

@steveshogren
Created August 19, 2013 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steveshogren/6269116 to your computer and use it in GitHub Desktop.
Save steveshogren/6269116 to your computer and use it in GitHub Desktop.
#if it is a macro...
defmacro ifworkday(first, second)
if workday(today()) do
return first
else
return second
end
end
ifworkday(1+1, doOtherHugeCalc())
#when the values are “shown”
defmacro ifworkday("1+1", "doOtherHugeCalc()")
if workday(today()) do
return eval("1+1")
else
return eval("doOtherHugeCalc()")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment