Retreive the underlying value.
Retreive the underlying value. Use only if you are completely sure that there is a value.
Returns ScallopOption, that contains the result of applying
to the value, if this option is non-empty and pf is defined for that value.pf
Returns ScallopOption, that contains the result of applying
to the value, if this option is non-empty and pf is defined for that value.
Returns empty ScallopOption otherwise.
pf
the partial function
Returns ScallopOption, that contains the value if applying predicate p to this value returned true.
Returns ScallopOption, that contains the value if applying predicate p to this value returned true. No value otherwise.
the predicate used for testing
Returns ScallopOption, that contains the value if applying predicate p to this value returned false.
Returns ScallopOption, that contains the value if applying predicate p to this value returned false. No value otherwise.
the predicate used for testing
Returns the result of applying f th this options value if this option is non-empty.
Apply the given procedure f to the option's value, if it is nonempty.
Retreive the underlying value as an option
A convenience method to check whether the underlying option is defined.
A convenience method to check whether the underlying option is defined. Just an alias for opt.get.isDefined.
A convenience method to check whether the underlying option is empty.
A convenience method to check whether the underlying option is empty. Just an alias for !opt.isDefined.
Tests whether the underlying value was explicitly supplied by user.
Returns ScallopOption, that contains the result of applying
to this option's value, if this option is non-empty.f
Returns ScallopOption, that contains the result of applying
to this option's value, if this option is non-empty.
Returns ScallopOption with no value otherwise.
f
the function to apply
Name for the option
Returns ScallopOption with this value if it is non-empty, or with the value of the alternative option.
Returns ScallopOption with this value if it is non-empty, or with the value of the alternative option. If it is empty too, the resulting ScallopOption will contain None.
the alternative expression
A class to hold a reference to not-yet-computed option values.
Basically, this is a lazy option - it batches up all operations, and evaluates the value only as the last resort.