option

class Object
trait Matchable
class Any

Type members

Classlikes

Value members

Concrete methods

final
def getOrElseF[A, F[_]](oa: Option[A])(fa: => F[A])(implicit F: Applicative[F]): F[A]

Returns the item contained in the Option wrapped in type F if the Option is defined, otherwise, returns the supplied action.

Returns the item contained in the Option wrapped in type F if the Option is defined, otherwise, returns the supplied action.

Inherited methods

final
def cata[A, X](oa: Option[A])(some: A => X, none: => X): X

Catamorphism over the option. Returns the provided function some applied to item contained in the Option if it is defined, otherwise, the provided value none.

Catamorphism over the option. Returns the provided function some applied to item contained in the Option if it is defined, otherwise, the provided value none.

Inherited from
OptionFunctions
final
def fold[A, X](oa: Option[A])(some: A => X, none: => X): X

Alias for cata

Alias for cata

Inherited from
OptionFunctions
final
def foldLift[F[_], A, B](oa: Option[A])(b: => B, k: F[A] => B)(implicit p: Applicative[F]): B

Returns the given value if None, otherwise lifts the Some value and passes it to the given function.

Returns the given value if None, otherwise lifts the Some value and passes it to the given function.

Inherited from
OptionFunctions
final
def foldLiftOpt[A, B](oa: Option[A])(b: => B, k: Option[A] => B): B

Returns the given value if None, otherwise lifts the Some value to Option and passes it to the given function.

Returns the given value if None, otherwise lifts the Some value to Option and passes it to the given function.

Inherited from
OptionFunctions
final
def none[A]: Option[A]

scala.None with a sometimes more convenient type.

scala.None with a sometimes more convenient type.

Inherited from
OptionFunctions
final
def orEmpty[A, M[_] : PlusEmpty](oa: Option[A]): M[A]

Returns the item contained in the Option wrapped in type M if the Option is defined, otherwise, the empty value for type M.

Returns the item contained in the Option wrapped in type M if the Option is defined, otherwise, the empty value for type M.

Inherited from
OptionFunctions
final
def some[A](a: A): Option[A]

scala.Some.apply with a sometimes more convenient type.

scala.Some.apply with a sometimes more convenient type.

Inherited from
OptionFunctions
final
def toFailure[A, B](oa: Option[A])(b: => B): Validation[A, B]
Inherited from
OptionFunctions
final
def toFailureNel[A, B](oa: Option[A])(b: => B): ValidationNel[A, B]
Inherited from
OptionFunctions
final
def toLeft[A, B](oa: Option[A])(b: => B): A \/ B
Inherited from
OptionFunctions
final
def toMaybe[A](oa: Option[A]): Maybe[A]
Inherited from
OptionFunctions
final
def toRight[A, E](oa: Option[A])(e: => E): E \/ A
Inherited from
OptionFunctions
final
def toSuccess[A, E](oa: Option[A])(e: => E): Validation[E, A]
Inherited from
OptionFunctions
final
def toSuccessNel[A, E](oa: Option[A])(e: => E): ValidationNel[E, A]
Inherited from
OptionFunctions

Implicits

Inherited implicits

implicit
def optionEqual[A](implicit A0: Equal[A]): Equal[Option[A]]
Inherited from
OptionInstances0
implicit
Inherited from
OptionInstances
implicit
Inherited from
OptionInstances
implicit
Inherited from
OptionInstances
implicit
val optionInstance: Traverse[Option] & MonadPlus[Option] & BindRec[Option] & Cozip[Option] & Zip[Option] & Unzip[Option] & Align[Option] & IsEmpty[Option] & Cobind[Option] & Optional[Option]
Inherited from
OptionInstances
implicit
Inherited from
OptionInstances
Inherited from
OptionInstances
implicit
Inherited from
OptionInstances
implicit
Inherited from
OptionInstances
implicit
def optionMax[A](implicit o: Order[A]): Monoid[MaxOption[A]] & Band[MaxOption[A]]
Inherited from
OptionInstances
Inherited from
OptionInstances
implicit
Inherited from
OptionInstances
implicit
Inherited from
OptionInstances
implicit
def optionMin[A](implicit o: Order[A]): Monoid[MinOption[A]] & Band[MinOption[A]]
Inherited from
OptionInstances
Inherited from
OptionInstances
implicit
Inherited from
OptionInstances
implicit
Inherited from
OptionInstances
implicit
def optionMonoid[A : Semigroup]: Monoid[Option[A]]
Inherited from
OptionInstances
implicit
def optionOrder[A](implicit A0: Order[A]): Order[Option[A]]

Add None as an element less than all As.

Add None as an element less than all As.

Inherited from
OptionInstances
implicit
def optionShow[A : Show]: Show[Option[A]]
Inherited from
OptionInstances