Created
February 19, 2019 18:30
-
-
Save polac24/33e60f60b4901aa67bba4f855a147e18 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func with<T>(x: T, _ f: (inout T) -> Void) -> T { | |
var value = x | |
f(&value) | |
return value | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment