Skip to content

Instantly share code, notes, and snippets.

@steveshogren
Created August 19, 2013 13:29
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/6269103 to your computer and use it in GitHub Desktop.
Save steveshogren/6269103 to your computer and use it in GitHub Desktop.
def ifworkday(first, second)
if workday(today()) do
return first
else
return second
end
end
x = ifworkday(1 + 1, doOtherHugeCalc())
#when the values are “shown”
def ifworkday(2, 3)
if workday(today()) do
return 2
else
return 3
end
end
x = ifworkday(2, 3) # CALLED BOTH FUNCTIONS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment