title: main method in intellij worksheet doesn't run?
body: <p>I am trying to use the worksheet functionality of Intellij. I have this simple code:</p>
  
  <pre><code>object Timer {
  
      // this function takes another function as an argument.
      // that function takes no args, and doesn't return anything.
      def oncePerSecond(callback: () =&gt; Unit) {
          while (true) { callback(); Thread.sleep(1000) }
      }
  
      // the function we'll pass in to oncePerSecond.
      // this can be any function that takes no args and doesn't
      // return anything.
      def timeFlies() {
          println("time flies like an arrow ...")
      }
  
      // the main() method, where we pass timeFlies into oncePerSecond.
      def main(args: Array[String]): Unit = {
          oncePerSecond(timeFlies)
      }
  }
  </code></pre>
  
  <p>Why doesn't it run? I don't see "time flies like an arrow" when it executes.</p>