RosettaCodeData/Task/Nested-function/Scala/nested-function.scala
2023-07-01 13:44:08 -04:00

11 lines
223 B
Scala

def main(args: Array[String]) {
val sep: String=". "
var c:Int=1;
def go(s: String):Unit={
println(c+sep+s)
c=c+1
}
go("first")
go("second")
go("third")
}