Creates a Some instance of Option containing the given value. This function is used to represent the presence of a value in an operation that may not always produce a value.
The value to be wrapped in a Some Option.
An Option instance representing the presence of a value.
const option = Some(42);console.log(option.unwrap()); // Outputs: 42 Copy
const option = Some(42);console.log(option.unwrap()); // Outputs: 42
Creates a Some instance of Option containing the given value. This function is used to represent the presence of a value in an operation that may not always produce a value.