Created
May 23, 2017 10:31
-
-
Save janekdb/70c892a4f6c3593aa09c974b19f72156 to your computer and use it in GitHub Desktop.
Scala Type Level Programming: The Natural Numbers: Multiplication Example
This file contains 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
// 2 x 3 5 x 7 x 11 x 13 x 17 = 510510 | |
type T510 = T5#mult[T10]#add[T1]#mult[T10] | |
type T510510 = T510#mult[T1000]#add[T510] | |
implicitly[T2#mult[T3]#mult[T5]#mult[T7]#mult[T11]#mult[T13]#mult[T17] =:= T510510] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment