Safely extracts the value from an Option with a fallback. Use this function when you need to convert an Option<A> to an A, providing a default value for the None case.
Option
Option<A>
A
None
The value to return if the Option is None
The contained value if Some, defaultValue if None
Some
defaultValue
Safely extracts the value from an
Optionwith a fallback. Use this function when you need to convert anOption<A>to anA, providing a default value for theNonecase.