Last active
January 7, 2019 14:39
-
-
Save andrevidela/36e347fb330b76b5fe41cafa3d42712d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Vector: FancyMult where A: Additive, A: Multiplicative { | |
typealias FancyVal = A | |
static func ** (lhs: Vector<A>, rhs: Vector<A>) -> A { | |
return lhs.fst * rhs.fst + lhs.fst * rhs.fst | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment