Option[T]
Represents optional values. Instances of Option
are either an instance of Some
or None
liftable getSome[T](opt: strict Option[T]): T
Get the value contained in a Some
. If the given option is a None
, a run-time error will occur
liftable getSomeOrElse[T](opt: Option[T], value: T): T
Get the value contained in a Some
. If the given option is a None
, the default value value
will be returned
liftable def getSomeOrElse[T](opt: Option[T], value: T): T = if isSome(opt) then getSome(opt) else value
liftable isNone[T](opt: strict Option[T]): Bool
Returns true
if the given option is a None
or false
if it is a Some
liftable isSome[T](opt: Option[T]): Bool
Returns true
if the given option is a Some
or false
if it is a None
None[T]: Option[T]
Represents non-existent values of type T
liftable Some[T](value: lazy T): Option[T]
Represents existing values of type T