Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.24 KB | None | 0 0
  1. import scala.Console._
  2.  
  3. object Main {
  4.   def read(echo: String = ""): Unit = {
  5.     print(echo)
  6.     readLine() match {
  7.       case "42" => ()
  8.       case s: String => read(echo=s + "\n")
  9.     }
  10.   }
  11.   def main(args: Array[String]) = read()
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement