Created
September 1, 2014 16:04
-
-
Save paulp/dcfcd587b9a682dd6d6b to your computer and use it in GitHub Desktop.
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
trait RankN { | |
type TransformRank1[CC[X]] = CC ~> CC | |
type TransformRank0[CC[X]] = CC[_] => CC[_] | |
def liftRank[CC[X]](f: TransformRank0[CC]): TransformRank1[CC] = | |
new TransformRank1[CC] { | |
def apply[A](x: CC[A]): CC[A] = f(x).castTo[CC[A]] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment