λ v4.0.0 Release Notes
Release Date: 2019-05-21 // almost 5 years ago-
🔄 Changed
- Breaking Change:
IO
is now sealed and moved to its own package. Most previous constructions using the static factory methods should continue to work (by simply targetingSupplier
now instead of an anonymousIO
), but some might need to be reworked, and subtyping is obviously no longer supported. - Breaking Change: Breaking all dependency on
java.util.function
types across the board. AllFn*
types target methods now support throwingThrowable
;apply
is now defaulted and will simply bypass javac to throw checked exceptions as if they were unchecked. AllChecked
variants have been eliminated as a consequence, as they are no longer necessary. Also, straggler functions likePartial2/3
that only existed to aid in partial application of non-curried functions are now superfluous, and have also been eliminated. - Breaking Change:
FoldRight
now requiresLazy
as part of its interface to support short-circuiting operations - Breaking Change: Eliminated all raw types and java11 warnings. This required using capture in unification parameters for Functor and friends, so nearly every functor's type-signature changed.
- Breaking Change:
Strong
is now calledCartesian
to better reflect the type of strength - Breaking Change: new Optic type hierarchy more faithfully encodes profunctor constraints on optics, new
Optic
type is now the supertype ofLens
andIso
, andlens
package has been moved tooptics
- Breaking Change:
Try
andEither
no longer preserveThrowable
type since it was inherently not type-safe anyway; Try is therefore no longer aBifunctor
, andorThrow
can be used to declare checked exceptions that could be caught by corresponding catch blocks IO
is now stack-safe, regardless of whether the composition nests linearly or recursively
➕ Added
- 👍
Lazy
, a monad supporting stack-safe lazy evaluation LazyRec
, a function for writing stack-safe recursive algorithms embedded inLazy
Applicative#lazyZip
, for zipping two applicatives in a way that might not require evaluation of one applicativeMonadT
, a general interface representing monad transformersMaybeT
, a monad transformer forMaybe
EitherT
, a monad transformer forEither
IdentityT
, a monad transformer forIdentity
LazyT
, a monad transformer forLazy
Endo
, a monoid formed byFn1
under compositionState
, the stateMonad
- 👍
Downcast
, a function supporting unchecked down-casting Cocartesian
, profunctorial strength in cocartesian coproduct termsPrism
, anOptic
that is nearly anIso
but can fail in one direction- 👍
Market
,Tagged
, profunctors supporting optics Re
for viewing anOptic
in one direction reliablyPre
for viewing at most one value from anOptic
in one directionSideEffect
, for representing side-effects runnable byIO
IO#safe
, mapping anIO<A>
to anIO<Either<Throwable, A>>
that will never throwIO#ensuring
, likefinally
semantics forIO
sIO#throwing
, for producing anIO<A>
that will throw a givenThrowable
when executedBracket
, for bracketing anIO
operation with a mapping operation and a cleanup operation
- Breaking Change: