maybeSomething match {
  case Some(x) => true
  case None => false
}

maybeSomething.getOrElse(false) Short code and readable

By Majid Hosseini, 2017-12-16 07:03:07