Skip to content

Instantly share code, notes, and snippets.

@lihaoyi
Created May 18, 2017 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lihaoyi/0d58447dddba9d361db5ded8516a9129 to your computer and use it in GitHub Desktop.
Save lihaoyi/0d58447dddba9d361db5ded8516a9129 to your computer and use it in GitHub Desktop.
lihaoyi test$ cat Test.scala
object Test{
def main(args: Array[String]): Unit = {
println(List(1, 2, 3).map(_ + 1))
println(List(1, 2, 3).map(_ + 1))
println(List(1, 2, 3).map(_ + 1))
println(List(1, 2, 3).map(_ + 1))
println(List(1, 2, 3).map(_ + 1))
}
}
lihaoyi test$ cat Test.kt
fun main(args: Array<String>) {
println(listOf(1, 2, 3).map{it * 2})
println(listOf(1, 2, 3).map{it * 2})
println(listOf(1, 2, 3).map{it * 2})
println(listOf(1, 2, 3).map{it * 2})
println(listOf(1, 2, 3).map{it * 2})
}
lihaoyi test$ ls -l Test*.class
-rw-r--r--@ 1 lihaoyi staff 1029 May 18 23:45 Test$$anonfun$main$1.class
-rw-r--r--@ 1 lihaoyi staff 1029 May 18 23:45 Test$$anonfun$main$2.class
-rw-r--r--@ 1 lihaoyi staff 1029 May 18 23:45 Test$$anonfun$main$3.class
-rw-r--r--@ 1 lihaoyi staff 1029 May 18 23:45 Test$$anonfun$main$4.class
-rw-r--r--@ 1 lihaoyi staff 1029 May 18 23:45 Test$$anonfun$main$5.class
-rw-r--r--@ 1 lihaoyi staff 1506 May 18 23:45 Test$.class
-rw-r--r--@ 1 lihaoyi staff 549 May 18 23:45 Test.class
-rw-r--r--@ 1 lihaoyi staff 3277 May 18 23:44 TestKt.class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment