Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// @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

This comment has been minimized.

Copy link

commented Jul 11, 2016

Did this end up submitted as a Swift Evolution proposal?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.