Optional

@_frozen
extension Optional
  • Attempts to unwrap the optional, and executes the closure if a value exists

    Declaration

    Swift

    public func unwrap(_ block: (Wrapped) throws -> Void) rethrows