λ v5.3.0 Release Notes

Release Date: 2020-12-07 // 11 months ago
  • 🔄 Changed

    • IterateT#unfold now only computes a single Pure for the given input
    • ReaderT#fmap and StateT#fmap avoid unnecessary calls to pure
    • MaybeT implements MonadError

    ➕ Added

    • $, function application represented as a higher-order Fn2
    • Fn1#withSelf, a static method for constructing a self-referencing Fn1
    • HNil/SingletonHList/TupleX#snoc, a method to add a new last element (append to a tuple)
    • Tuple2-8#init, for populating a TupleN with all but the last element

    🛠 Fixed

    • IterateT#trampolineM now yields and stages all recursive result values, rather than prematurely terminating on the first termination result
    • IterateT#flatMap is now stack-safe regardless of how many consecutive empty IterateTs are returned and regardless of whether the monad is strict or lazy or internally trampolined

Previous changes from v5.2.0

  • 🔄 Changed

    • HList#cons static factory method auto-promotes to specialized HList if there is one
    • EitherT gains a MonadError instance

    ➕ Added

    • 🔀 MergeHMaps, a Monoid that merges HMaps by merging the values via key-specified Semigroups
    • Id#id overload that accepts an argument and returns it
    • MaybeT#or, choose the first MaybeT that represents an effect around just a value
    • MaybeT#filter, filter a Maybe inside an effect
    • StateMatcher, StateTMatcher, WriterTMatcher
    • ReaderT#and, category composition between ReaderT instances: (a -> m b) -> (b -> m c) -> (a -> m c)
    • IterateT, ListT done right
    • Comparison, a type-safe sum of LT, EQ, and GT orderings
    • Compare, a function taking a Comparator and returning a Comparison
    • Min/Max/...With variants for inequality testing with a Comparator