Skip to content

Instantly share code, notes, and snippets.

@andrevidela
Created January 7, 2019 14:17
Show Gist options
  • Save andrevidela/786b6b3e7a321ab23c967e0246dc5374 to your computer and use it in GitHub Desktop.
Save andrevidela/786b6b3e7a321ab23c967e0246dc5374 to your computer and use it in GitHub Desktop.
/// Protocol for addition with identity
protocol Additive {
static var addId: Self { get }
static func + (_ lhs: Self, _ rhs: Self) -> Self
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment