Nested function: Difference between revisions
Content deleted Content added
No edit summary |
|||
Line 692: | Line 692: | ||
print makeList(". ")</lang> |
print makeList(". ")</lang> |
||
=={{header|Scala}}== |
|||
def main(args: Array[String]) { |
|||
def go(n: Int):Unit={ |
|||
if(n==1){ |
|||
println("1. first") |
|||
go(2) |
|||
} |
|||
if(n==1){ |
|||
println("2. second") |
|||
go(3) |
|||
} |
|||
if(n==1){ |
|||
println("3. third") |
|||
} |
|||
} |
|||
go(1) |
|||
} |
|||
=={{header|Scheme}}== |
=={{header|Scheme}}== |