Skip to content

Commit fc09db9

Browse files
authored
Expand optional protocol to abstract some and none (pointfreeco#63)
1 parent 8b423aa commit fc09db9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/StructuredQueriesCore/Optional.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
public protocol _OptionalProtocol<Wrapped> {
22
associatedtype Wrapped
33
var _wrapped: Wrapped? { get }
4+
static var none: Self { get }
5+
static func some(_ wrapped: Wrapped) -> Self
46
}
57

68
extension Optional: _OptionalProtocol {

0 commit comments

Comments
 (0)