Funcky 2.7.0 | Funcky.XUnit 1.0.0 | Funcky.Analyzers 1.1.0
This release is the last non-breaking release for Funcky before 3.0.
Deprecations
EnumerableExtensions.CartesianProductwill be removed in Funcky 3.- To align our naming with that of the BCL, the
ParseOrNonemethods
that return a type that has a keyword in C#int,long, etc. use the name of the BCL type instead.
Example:ParseIntOrNonebecomesParseInt32OrNone.
The old methods will be removed in Funcky 3. - In preparation for Funcky 3 we deprecated
Option<T>.Nonewhen used as method group. UseOption.None<T>instead.
New ParseOrNone extensions
With the help of a source generator we have added a lot of new ParseOrNone methods for various types from the BCL:
- Unsigned integer types
DateOnly,TimeOnlyVersion- Support for
ReadOnlySpan<T>as input - ... and more
Convenience for Either and Result
- Added implicit conversions for
EitherandResult. - Implement
InspectforEitherandResult. - Added
PartitionforIEnumerable<Either>andIEnumerable<Result>. - Added
ToStringonEitherandResult. - Implement
ToEitheronOption.
IEnumerable<T> extensions
AnyOrElse- Prefix sum:
InclusiveScanandExclusiveScan
Analyzers
This release adds two new analyzer rules:
- λ1003: Warning when certain methods, such as
Matchare used without argument labels - λ1004: Warning that suggests
.ConcatToString()over.JoinToString("")
Both of these warnings come with corresponding code fixes.
Funcky.Xunit
- Breaking: Funcky.Xunit now uses the
Funckynamespace, instead ofFuncky.Xunit. - Add assertion methods for testing
Either:FunctionalAssert.IsLeftandFunctionalAssert.IsRight.