Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ashikahmad/a2adcaae108217ddff5f328370e40631 to your computer and use it in GitHub Desktop.
Save ashikahmad/a2adcaae108217ddff5f328370e40631 to your computer and use it in GitHub Desktop.
func with<T: AnyObject>(_ obj: T, task: (T)->Void) -> T {
task(obj)
return obj
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment