λ v3.0.0 Release Notes

Release Date: 2018-05-04 // about 6 years ago
  • 🔄 Changed

    • Breaking Change: Sequence now has two more type parameters to aid in inference
    • Breaking Change: Traversable#traverse now has three more type parameters to aid in inference
    • Breaking Change: Monad#zip now forces m a -> b before m a in default Applicative#zip implementation; this is only breaking for types that are sensitive to computation order (the resulting values are the same)
    • Breaking Change: TypeSafeKey is now dually parametric (single parameter analog is preserved in TypeSafeKey.Simple)
    • Bifunctor is now a BoundedBifunctor where both parameter upper bounds are Object
    • Peek2 now accepts the more general BoundedBifunctor
    • 👍 Identity, Compose, and Const functors all have better toString implementations
    • 👍 Into3-8 now supports functions with parameter variance
    • HListLens#tail is now covariant in Tail parameter
    • More functions now automatically deforest nested calls (concat cons, cycle, distinct, drop, dropwhile, filter, map, reverse, snoc, take, takewhile, tail)
    • 👍 Flatten calls Iterator#hasNext less aggressively, allowing for better laziness
    • Lens subtypes LensLike
    • View/Set/Over now only require LensLike
    • HMap#keys now returns a Set
    • HMap#values now returns a Collection
    • Unfoldr is now lazier, deferring all computations until hasNext/next calls
    • Present is now a singleton

    ➕ Added

    • BoundedBifunctor, a Bifunctor super type that offers upper bounds for both parameters
    • Try, a Monad representing an expression-like analog of try/catch/finally
    • CheckedRunnable, the Runnable counterpart to CheckedSupplier that can throw checked exceptions
    • Unit, the lambda analog to Void, except actually inhabited by a singleton instance
    • Kleisli, the abstract representation of a Kleisli arrow (Monad#flatMap) as an Fn1
    • These, a CoProduct3 of A, B, or Tuple2<A,B>
    • Span, for splitting an Iterable into contiguous elements matching a predicate
    • MagnetizeBy and Magnetize, for grouping elements by pairwise predicate tests
    • Both, for dually applying two functions and producing a Tuple2 of their results
    • Lens#both, for dually focusing with two lenses at once
    • IfThenElse, an expression form for if statements
    • CheckedRunnable and CheckedSupplier conversion and convenience methods
    • LensLike, common capabilities that make a type usable as if it were a Lens
    • Iso, isomorphisms between two types (invertible functions that are also lenses)
    • Exchange, a Profunctor that can extract the morphisms from an Iso
    • HMapLens, lenses focusing on HMap
    • MapLens#mappingValues(Iso), a lawful lens that maps the values of a j.u.Map
    • Under, the inverse of Over for Iso
    • 👍 TypeSafeKey is an Iso and supports mapping
    • TypeSafeKey.Simple, the single parameter version of TypeSafeKey
    • Either#trying overloads that accept CheckedRunnable

    🗄 Deprecated

    • 🗄 MapLens#mappingValues(Function) is now deprecated in favor of the overload that takes an Iso