Converting imperative style user input menu to functional programming style
One of the Scala features you need to get used to using is match - it is your friend. One of your very best friends.

Also, the way you have defined menu is recursive, with no bounding. In this particular case, it's probably not an issue, but it is, in general a Really Bad Idea.

Finally, you have repeated the printing of the menu and reading of the option. In general, one should follow Don't Repeat Yourself.

So how about something like the code below. Note, one of the rare cases tailor made for do...while.

def menu(option: Int): Boolean = {
  option match {
    case 1 =&gt;
      println("selected 1")
      true
    case 2 =&gt;
      println("selected 2")
      true
    case 3 =&gt;
      println("selected quit")
      false
    case _ =&gt; // the else case
      println("Sorry, that command is not recognized")
      true
  }
}

def readOption: Int = {
  println("""|Please select one of the following:
             |  1 - one 
             |  2 - two
             |  3 - quit""".stripMargin)
  StdIn.readInt()
}

def main(args: Array[String]) {
  var opt = 0
  do {
    opt = readOption
  } while (menu(opt))
}


Alternately, if you wanted to something more functional, you could change menu to something like this:

val actionMap = Map[Int, () =&gt; Boolean](1 -&gt; handleOne, 2 -&gt; handleTwo, 3 -&gt;handleThree)

def handleOne(): Boolean = {
  println("selected 1")
  true
}

def handleTwo(): Boolean = {
  println("selected 2")
  true
}

def handleThree(): Boolean = {
  println("selected quit")
  false
}

def menu(option: Int): Boolean = {
  actionMap.get(option) match {
    case Some(f) =&gt; f()
    case None =&gt;
      println("Sorry, that command is not recognized")
      false
  }
}


Where actionMap maps each Int to a function that takes no parameters and returns a Boolean. In menu, we use option as the key into the map and then call the result (if there is one).