Scala REPL "She's gone rogue" error message

In a little bit of accidental Scala REPL fun this afternoon, I was testing a recursive algorithm like the following simple factorial algorithm, and forgot a return statement:

def factorial(n: Int):Int = {
  if (n == 1) n    // forgot 'return' here
  factorial(n - 1)
}

When I pasted that code into the Scala REPL and then tried to test it as shown below, it didn't come back for a while, until it failed with this error message:

She's gone rogue, captain!

Having lived in Alaska for a few years (and lived through the 2008 U.S. election) I can certainly appreciate the "She's gone rogue!" error message.

 

Post new comment

The content of this field is kept private and will not be shown publicly.