Funcky 3.3.0 | Funcky.Analyzers 1.3.0 | Funcky.Xunit 2.0.1
This is a relatively minor release focusing on convenience for our monads Option, Either and Result.
GetOrElse and OrElse for all
We've added GetOrElse and OrElse to Either and Result bringing them on par with Option.
The corresponding analyzer now also correctly suggests using these methods instead of Match for Result and Either.
Inspect for the error case
All three alternative monads Option, Either and Result now support inspecting the «error» case:
Option.InspectNone- executes a side effect only when the option isNone.Either.InspectLeft- executes a side effect only when the either is on theLeftside.Result.InspectError- executes a side effect only when the result is anError.
These methods are particularly useful for logging warnings/errors.