Forked from anonymous/gist:d688be81db7b81d9705038c8860120ec
Created
April 1, 2016 17:49
-
-
Save soc/ccba45a8425ad9801150c759bfea6977 to your computer and use it in GitHub Desktop.
Kotlin and Scala
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
== Kotlin | |
class T { | |
fun t(): Unit { | |
val double = { x:Int -> x * 2 } | |
listOf(1,2).map { x -> x * 2 }.map{ it + 1 }.map( double ) | |
} | |
} | |
creates | |
T$t$double$1.class | |
T.class | |
== Scala | |
class T { | |
def t(): Unit = { | |
val double = (x: Int) => x + 1 | |
List(1, 2).map { x => x * 2 }.map { _ + 1}.map(double) | |
} | |
} | |
creates | |
T$$anonfun$1.class | |
T$$anonfun$t$1.class | |
T$$anonfun$t$2.class | |
T.class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment