-
-
Save HamGuy/fd139b7af9ac6b0a218f44ff969ff08f 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
// @discardableResult to be added | |
// @noescape needs to move to type annotation | |
// needs to add _ for item | |
public func with<T>(item: T, @noescape update: (inout T) throws -> Void) rethrows -> T { | |
var this = item; try update(&this); return this | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment