Constructs a Option from a dynamic value
If the value is Option it will return the value itself
If the value is Value it will return Some<Value>
otherwise returns None
Returns None or throws an error if it is Some
Convinient operator to get the error from the result,
user should ensure that the value is None, otherwise it will throw an UnimplementedError
Usage:
final res = Option.none();
final err = res / 0;
assert(err is None);
Returns the Value if it is Some or throws an error if it is None
Convinient operator to get the value from the result,
user should ensure that the result is Some, otherwise it will throw an UnimplementedError
Usage:
final res = Option