Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 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