June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
13
Task/Topic-variable/Scala/topic-variable.scala
Normal file
13
Task/Topic-variable/Scala/topic-variable.scala
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
object TopicVar extends App {
|
||||
class SuperString(val org: String){
|
||||
def it(): Unit = println(org)
|
||||
}
|
||||
|
||||
new SuperString("FvdB"){it()}
|
||||
new SuperString("FvdB"){println(org)}
|
||||
|
||||
Seq(1).foreach {println}
|
||||
Seq(2).foreach {println(_)}
|
||||
Seq(4).foreach { it => println(it)}
|
||||
Seq(8).foreach { it => println(it + it)}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue