Skip to content

Instantly share code, notes, and snippets.

@alexnikol
Created April 30, 2020 13:19
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 alexnikol/55aba7f33a3ca21b88407cebc9cc26ef to your computer and use it in GitHub Desktop.
Save alexnikol/55aba7f33a3ca21b88407cebc9cc26ef to your computer and use it in GitHub Desktop.
Nested Swift Function Example
func runReportFlow() {
func getWeekReportBody() {} //First Nested Function
func getMonthReportBody() {} //Second Nested Function
if isSomeConditionTrue {
getWeekReportBody()
} else {
getMonthReportBody()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment