Skip to content

Instantly share code, notes, and snippets.

@Kametrixom
Last active September 3, 2015 07:01
Show Gist options
  • Save Kametrixom/4e62d83d665e832595b2 to your computer and use it in GitHub Desktop.
Save Kametrixom/4e62d83d665e832595b2 to your computer and use it in GitHub Desktop.
// I really like this one
func doIt(inout s: D) {
if case self = isUniquelyReferenced(&s),
self.`self` = true where self {
self.`self` = { [unowned x = [self, 7] as Self] n in
print(x + n)
} as () -> ()
}
}
@Kametrixom
Copy link
Author

@pyrtsa This does compile, however the syntax high-lighting doesn't match, good effort though!

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