Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save raonivaladares/d03404387bea7c6fd7ef24c101f4d338 to your computer and use it in GitHub Desktop.
Save raonivaladares/d03404387bea7c6fd7ef24c101f4d338 to your computer and use it in GitHub Desktop.
func sum<T: Numeric>(x: T, y: T) -> T {
return x + y
}
@anettodev
Copy link

protocol CustomAddable
{
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