Scalaz has a way to do it with BooleanOps.option.
That would allow you to write :
myBool.option(someResult)
If you don’t want to add a Scalaz dependency, just add the following in your code :
implicit class RichBoolean(val b: Boolean) extends AnyVal {
final def option[A](a: => A): Option[A] = if (b) Some(a) else None
}