Calls the provided onSome function if the Option is a Some instance.
onSome
Option<TValue> onSome(void Function(TValue value) onSome) { switch (this) { case Some(value: final value): onSome(value); default: } return this; }