mapgetOrElse(false) / getOrElse(true)를 보고하고 exists / forall로 바꿀 것을 제안합니다.

예:


  def p(x: Int): Boolean = ???
  Option(0).map(p).getOrElse(false)
  Option(0).map(p).getOrElse(true)

빠른 수정 적용 후:


  def p(x: Int): Boolean = ???
  Option(0).exists(p)
  Option(0).forall(p)