Skip to content

Instantly share code, notes, and snippets.

@mr-v
Created October 12, 2016 12:24
Show Gist options
  • Save mr-v/8deee18c7c5db1e50b2574871f5f11ea to your computer and use it in GitHub Desktop.
Save mr-v/8deee18c7c5db1e50b2574871f5f11ea to your computer and use it in GitHub Desktop.

When calling:

private func scheduleSurveyAvailableNotification(id id: Int, surveyDate: NSDate)

instead of:

        dates.enumerate().forEach { index, date in
            scheduleSurveyAvailableNotification(id: index, surveyDate: date)
        }

you can do:

dates.enumerate().forEach(scheduleSurveyAvailableNotification)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment