Skip to content

JFomit.Functional-3.2.0

Latest

Choose a tag to compare

@JFomit JFomit released this 20 Aug 15:23
a418100

Changes

This release brings new and improved linq support for efficient validation and parsing. See for yourself:

record RawData(Option<int> IntValue, Option<string> StringValue)
{
    public Option<ValidData> Parse()
        => from intValue in IntValue
           where intValue != 0
           from stringValue in StringValue
           where !string.IsNullOrEmpty(stringValue)
           select new ValidData(intValue, stringValue);
}
record ValidData(int NonZero, string NonEmpty);

Added:

  • SelectMany overloads to support nested from clauses for both Option<T> and Result<T,E>.

Full Changelog: v3.1.0...v3.2.0