Skip to content

Instantly share code, notes, and snippets.

@discardableResult
@inlinable
private func with<T>(_ value: T, _ builder: (T) throws -> Void) rethrows -> T {
try builder(value)
return value
}
// Use
class MyClass {
var prop = "it's"