Option<T>.some constructor

  1. @literal
const Option<T>.some(
  1. T value
)

Creates a Some with the given value.

Examples

// prints "Some(2)"
print(const Option.some(2));

Implementation

@literal
const factory Option.some(T value) = Some<T>;