Created
July 4, 2016 19:06
-
-
Save JohnReedLOL/bad7f65650265f0dabe04441e5219acd 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
val times2 = (x: Int) => x*2 | |
type toExtend = shapeless.PolyDefns.->[Int, Int] | |
// These are the same | |
object doubleObj1 extends (Int -> Int) (times2) | |
object doubleObj2 extends (->[Int, Int]) (times2) | |
object doubleObj3 extends ->[Int, Int](times2) | |
object doubleObj4 extends shapeless.PolyDefns.->[Int, Int](times2) | |
object doubleObj5 extends toExtend(times2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment