Avatar
// Manual propagation struct FooError: Error {} func foo(string: String) -> Result<Int, FooError> { guard let number = Int(string) else { return .failure(FooError()) } return .success(number) } // Automatic propagation func foo(string: String) throws -> Int { let a = try bar() let b = try baz() return a + b }