of<B> function
Wraps the given value in a Some, indicating the presence of a value.
Example usage:
final someOption = of(42); // This will be Some(42)
Implementation
Option<B> of<B>(B value) {
return Some<B>(value);
}
Wraps the given value in a Some, indicating the presence of a value.
Example usage:
final someOption = of(42); // This will be Some(42)
Option<B> of<B>(B value) {
return Some<B>(value);
}