Skip to content

JFomit.Functional-3.0.0

Choose a tag to compare

@JFomit JFomit released this 22 Apr 16:53
· 11 commits to master since this release

Changes

Added:

  • Collection initialization syntax ([]) support for Unit type
  • Discard<T> helper method in Prelude
  • Additional overloads for Catch methods in Prelude that also take additional context parameter
  • Casting methods for Option<T>: throwing Cast<U> and non-throwing OfType<U>
  • Absurd type that cannot be constructed
    While not really useful on its own, this type can be used as a marker of sorts, for example as a dummy parameter that is not actually expected to be passed.

Breaking changes

  • Option<T> is no longer an IEnumerable<T>
    It confused IntelliSense too much (by clashing with System.Linq) and most of collections methods are implemented in JFomit.Functional.Extensions anyway.
  • Renamed UnitValue to Unit
    This makes using Unit as a type in generics prettier on the eyes.