Tags: libanvl/opt
Tags
Enhance Opt class with new transformation methods (#24) Updated `Opt.cs` to add overloaded `AndThen` methods supporting nullable return types and introduced new `OrThen` methods for option handling. Added unit tests in `OptTests.cs` to validate the new functionality for both some and none cases.
Fix nullable bugs in Select and From Updated the `Opt` class in `Opt.cs` to include XML documentation for the `From` method, which now supports both nullable value types and non-nullable reference types. Converted `Zip` and `Flatten` methods to extension methods. Changed the constructor of `Opt<T>` to internal and modified the `Select` method to accept functions returning nullable types. Added a new `Where` method for filtering options based on predicates. In `OptTests.cs`, added unit tests for the `Select` and `Where` methods, covering value transformations, null handling, and behavior when the option is `None`. Included additional tests for casting options to validate correct and incorrect casts.
PreviousNext