Created
May 25, 2017 08:40
-
-
Save janekdb/ce1cf333140f4092b46f61566867fd19 to your computer and use it in GitHub Desktop.
Scala Type Level Programming: The Natural Numbers: High Hex
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
sealed trait Nat { | |
type inc <: Nat | |
type dbl <: Nat | |
type A = this.type#dbl#inc#dbl#dbl#inc#dbl | |
type B = this.type#dbl#inc#dbl#dbl#inc#dbl#inc | |
type C = this.type#dbl#inc#dbl#inc#dbl#dbl | |
type D = this.type#dbl#inc#dbl#inc#dbl#dbl#inc | |
type E = this.type#dbl#inc#dbl#inc#dbl#inc#dbl | |
type F = this.type#dbl#inc#dbl#inc#dbl#inc#dbl#inc | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment