Created
February 2, 2017 06:31
-
-
Save endor/08f9f961ea27251e7ce727df090324e8 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
sealed trait Nat | |
sealed trait Zero extends Nat | |
sealed trait Succ[N <: Nat] extends Nat | |
case class A[N <: Nat]() | |
f1 | |
def f1[N <: Nat]: A[Succ[N]] = | |
f2 | |
def f2: A[Succ[Zero]] = | |
new A[Succ[Zero]]() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment