Last active
May 16, 2018 13:58
-
-
Save szeiger/3a2e7e65b641bac9764a9c02de233ab9 to your computer and use it in GitHub Desktop.
Kind-polymorphic Any and Nothing
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
scala> def f[C[_], E]: List[C[E]] = Nil | |
warning: there was one feature warning; re-run with -feature for details | |
f: [C[_], E]=> List[C[E]] | |
scala> f[List, Int] | |
res5: List[List[Int]] = List() | |
scala> f[Any, Int] | |
res6: List[Any] = List() | |
scala> f[Nothing, Int] | |
res7: List[Nothing] = List() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment