We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
class Bob { def hey(arg: String): String = { def isYelling(s: String) = !s.filter(_.isLetter).isEmpty() && s.toUpperCase() == s arg.trim match { case "" => "Fine. Be that way!" case s: String if isYelling(s) => "Whoa, chill out!" case s: String if s.endsWith("?") => "Sure." case _ => "Whatever." } } }