All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog.
Fn3-8static factory overloads to aid in coercing lambdas- Adding composition guarantees to
LensLike CmpEqBy,CmpEq,GTBy,GT,LTBy,LT,GTEBy,GTE,LTEBy, andLTEinequality checksMinBy,MaxBy,Min, andMaxsemigroupsProduct2-8interfaces, representing general product typesUnion, a monoid that behaves like a lazy set union onIterablesDifference, a semigroup that behaves like a partially lazy set difference onIterablesLambdaMap, extension point forj.u.Map, similar toLambdaIterableSequence#sequenceoverloads forj.u.Mapthat traverse via intermediateLambdaMapinstancesIntersection, a semigroup that behaves like a lazy set intersection onIterablesFn0, a function fromUnitto some valueFn1#thunk, producing anFn0Absent, a monoid overMaybethat is absence biasedRateLimit, a function that iterates elements from anIterableaccording to some rate limitTry#withResources,Try's expression analog to Java 7's try-with-resources statementOccurrences, for counting the occurrences of the members of anIterableEffect, anFn0returningUNITNoop, a no-opEffectFn1#widen, add an ignored argument to the beginning of any function to raise its arity by one
Tuple2-8now implementProduct2-8Intonow acceptsMap.EntryInto3-8now accept a product of the same cardinality, instead of requiring a tupleCoProduct2-8#projectnow return generalized productsChoice2-8#projectreturn tuplesliftA2receives more parameters to aid inferenceCompose#getComposenow supports inference
MapLens#mappingValues, deprecated in a prior releaseCollectionLens#asSet, deprecated in a prior releaseCollectionLens#asStream, deprecated in a prior release
3.0.3 - 2018-05-27
Lens#toIso, for converting a lens to an isoHMap#hMapoverloads up to 8 bindings deepSchema, schemas for extracting multiple values fromHMaps by aggregatingTypeSafeKeys
- Deforested iterables execute in intended nesting order, where essential
3.0.2 - 2018-05-21
IterableLens#mapping, anIsothat maps values
TypeSafeKey.Simplenow has a default#applyimplementation
- mapped
TypeSafeKeyinstances can be used for initial put in anHMap, and the base key can be used to retrieve them - Merged pull request fixing issue storing values at mapped
TypeSafeKeyinsingletonHMap
3.0.1 - 2018-05-13
ToMapaccepts anIterablecovariant inMap.EntryRecursiveResult#invertis also aRecursiveResultFirst/And/Ormonoids all utilize short-circuitingMonoid#foldLeft/foldRightdelegate toMonoid#reduceLeft/reduceRight, respectively
Upcastfor safely casting up a type hierarchySetLens, lenses operating onSetsToArray, for convertingIterable<A>toA[]
3.0.0 - 2018-05-04
- Breaking Change:
Sequencenow has two more type parameters to aid in inference - Breaking Change:
Traversable#traversenow has three more type parameters to aid in inference - Breaking Change:
Monad#zipnow forcesm a -> bbeforem ain defaultApplicative#zipimplementation; this is only breaking for types that are sensitive to computation order (the resulting values are the same) - Breaking Change:
TypeSafeKeyis now dually parametric (single parameter analog is preserved inTypeSafeKey.Simple) Bifunctoris now aBoundedBifunctorwhere both parameter upper bounds areObjectPeek2now accepts the more generalBoundedBifunctorIdentity,Compose, andConstfunctors all have bettertoStringimplementationsInto3-8now supports functions with parameter varianceHListLens#tailis now covariant inTailparameter- More functions now automatically deforest nested calls (
concatcons,cycle,distinct,drop,dropwhile,filter,map,reverse,snoc,take,takewhile,tail) FlattencallsIterator#hasNextless aggressively, allowing for better lazinessLenssubtypesLensLikeView/Set/Overnow only requireLensLikeHMap#keysnow returns aSetHMap#valuesnow returns aCollectionUnfoldris now lazier, deferring all computations untilhasNext/nextcallsPresentis now a singleton
BoundedBifunctor, aBifunctorsuper type that offers upper bounds for both parametersTry, aMonadrepresenting an expression-like analog oftry/catch/finallyCheckedRunnable, theRunnablecounterpart toCheckedSupplierthat can throw checked exceptionsUnit, the lambda analog toVoid, except actually inhabited by a singleton instanceKleisli, the abstract representation of aKleisliarrow (Monad#flatMap) as anFn1These, aCoProduct3ofA,B, orTuple2<A,B>Span, for splitting anIterableinto contiguous elements matching a predicateMagnetizeByandMagnetize, for grouping elements by pairwise predicate testsBoth, for dually applying two functions and producing aTuple2of their resultsLens#both, for dually focusing with two lenses at onceIfThenElse, an expression form forifstatementsCheckedRunnableandCheckedSupplierconversion and convenience methodsLensLike, common capabilities that make a type usable as if it were aLensIso, isomorphisms between two types (invertible functions that are also lenses)Exchange, aProfunctorthat can extract the morphisms from anIsoHMapLens, lenses focusing onHMapMapLens#mappingValues(Iso), a lawful lens that maps the values of aj.u.MapUnder, the inverse ofOverforIsoTypeSafeKeyis anIsoand supports mappingTypeSafeKey.Simple, the single parameter version ofTypeSafeKeyEither#tryingoverloads that acceptCheckedRunnable
MapLens#mappingValues(Function)is now deprecated in favor of the overload that takes anIso
2.1.1 - 2018-01-16
- Breaking Change: Moved
TrampolineandRecursiveResultto better package
2.1.0 - 2018-01-14
- Breaking Change:
CollectionLens#asSetis now lawful and preserves new incoming values in the update set - Breaking Change:
IterableLens#headis now aLens.Simple<Iterable<A>, Maybe<A>>and is lawful - Breaking Change:
ListLens#elementAtis now aLens.Simple<List<X>, Maybe<X>>supporting defensive copies - Breaking Change:
MapLens#valueAtis now aLens.Simple<Map<K,V>, Maybe<V>>supporting defensive copies MapLens#keysnow uses defensive copies and does not alter the focused on mapMapLens#valuesnow uses defensive copies and does not alter the focused on mapMapLens#invertednow uses defensive copies and does not alter the focused on mapHListLens#headis now covariant in the tail of bothSandTPredicate#contraMapis now covariant in its return typeBiPredicate#contraMapandBiPredicate#diMapLare now both covariant in their return types
Fn3#fn3andFn4#fn4static factory methodsFn5throughFn8Tuple5#intoTuple6throughTuple8CoProduct6throughCoProduct8andChoice6throughChoice8CoProduct5#divergeandChoice5#divergeInto3throughInto8, for applying aTuple*to anFn*Times, for successively accumulating a result by iterating a function over a value some number of timesSlide, for "sliding" a window of some number of elements across anIterableEither#filteroverload supporting a function fromRtoLin the failing predicate caseCollectionLens#asSet(Function), a proper analog ofCollectionLens#asSet()that uses defensive copiesCollectionLens#asStream(Function), a proper analog ofCollectionLens#asStream()that uses defensive copies- Explicitly calling attention to all unlawful lenses in their documentation
PeekandPeek2, for "peeking" at the value contained inside any givenFunctororBifunctorwith given side-effectsTrampolineandRecursiveResultfor modeling primitive tail-recursive functions that can be trampolined
Either#toOptional, deprecated in previous releaseEither#fromOptional, deprecated in previous releasesequenceoverloads supportingOptional, deprecated in previous releaseOptionalLens, deprecated in previous releaseTraversableIterable, deprecated in previous releaseTraversables, deprecated in previous release
CollectionLens#asSet()in favor ofCollectionLens#asSet(Function)CollectionLens#asStream()in favor ofCollectionLens#asStream(Function)
2.0.0 - 2017-11-13
- Breaking Change:
java.util.Optionalreplaced withMaybeacross the board Profunctor#diMap/L/Rparameters allow varianceEither#toOptionalno longer allowsnullvalues in the right side, and is now in sync with CoProduct#projectBUnfoldrallows variance on input
CoProductN#embedno longer eagerly invokes functionsPrependAllnow only createsO(1)Iterables instead ofO(3n + 1)
Monadarrives. The followingApplicatives are now alsoMonad:LensConstTuple*Choice*IdentityEitherFn*LambdaIterableMaybeSingletonHList
Force, for forcing iteration of anIterableto perform any side-effectsSnoc, for lazily appending an element to the end of anIterableCoalesce, for folding anIterable<Either<L, R>>into anEither<Iterable<L>, Iterable<R>>And,Or, andXorall gainBiPredicate<Boolean, Boolean>propertiesLambdaIterable, an adapterIterablethat support lambda typesMaybe, lambda's analog ofjava.util.Optionalconforming to all the lambda typesContravariant, an interface representing functors that map contravariantly over their parametersProfunctorextendsContravariantTails, for iterating all the tail element subsequences of anIterableInits, for iterating all the initial element subsequences of anIterableInit, for iterating all but the last element of anIterableCatMaybes, for unwrapping the present values in anIterable<Maybe<A>>to produce anIterable<A>
Fn1#then(Function<? super B, ? extends C>), deprecated in previous releaseFn1#adapt(Function<A, B> function), deprecated in previous releaseFn2#adapt(BiFunction<A, B, C> biFunction), deprecated in previous release
Traversablesand all methods therein, in favor of eitherLambdaIterableorMaybeTraversableOptionalin favor ofMaybeTraversableIterablein favor ofLambdaIterableSequenceoverloads supportingOptionalin favor of convertingOptionaltoMaybeand then sequencingEither#toOptionalandEither#fromOptionalin favor of itsMaybecounterparts
1.6.3 - 2017-09-27
- Loosening variance on
Fn2#fn2andFn1#fn1
ConcatenatingIteratorbug where deeply nestedxsskip elements
Fn1#thenin favor ofFn1#andThen(redundant)Fn1#adaptin favor ofFn1#fn1(rename)Fn2#adaptin favor ofFn2#fn2(rename)
Fn1#andThenoverload to support composition withBifunctionFn1#composeoverload to support composition withBifunctionandFn2LiftA2to lift and apply aBifunctionto twoApplicativesFlattento lazily flatten nestedIterable<Iterable<A>>s toIterable<A>Replicate, short-hand composition oftakeandrepeatDistinctto produce anIterableof distinct values in anotherIterableSortandSortByfor eagerly, monolithically sortingIterables and producingListsIterableLens, general lenses overIterableXor, a monoid representing logical exclusive-or
1.6.2 - 2017-08-20
- Removing need for various suppressed unchecked warnings in
ChoiceNtypes HListabstract super type loses both unnecessary parameters
- ClassCastException
BiPredicate.flip
Uncons, for destructuring anIterableinto its head and tailComposesemigroup and monoid formed overCompletableFutureMonoidandSemigroupboth preserve type specificity throughflipcalls
1.6.1 - 2017-06-17
- Loosening visibility on
Traversablesmethods topublic
1.6.0 - 2017-06-04
Functor,Bifunctor, andProfunctor(as well as all instances) get a unification parameterIdentitysupports value equalityConstsupports value equalitypartitionnow only requires iterables ofCoProudct2CoProductNs receive a unification parameter, which trickles down toEitherandChoicesConcatnow represents a monoid forIterable; previousConcatsemigroup and monoid renamed to more appropriateAddAllLensis now an instance ofProfunctor
Either#invertis pulled up intoCoProduct2and additionally specialized forChoice2CoProductN#embednot, used for negating predicate functionsempty, used to test if an Iterable is emptygroupBy, for folding an Iterable into a Map given a key functionApplicativearrives; all functors gain applicative propertiesTraversablearrives;SingletonHList,Tuple*,Choice*,Either,Identity, andConstgain traversable propertiesTraversableOptionalandTraversableIterablefor adaptingOptionalandIterable, respectively, toTraversablesequencefor wrapping a traversable in an applicative during traversalCompose, an applicative functor that represents type-level functor composition
1.5.6 - 2017-02-11
CoProductN.[a-e]()static factory methods moved to equivalentChoiceNclass. Coproduct interfaces now solely represent methods, no longer have anonymous implementations, and no longer require aFunctorconstraint
ChoiceNtypes, representing concrete coproduct implementations that are alsoFunctorandBiFunctortoMap,last,cons,prependAll,intersperseTuple2/3/4#into, for applying the values in a tuple as positional arguments to a function.FirstandLastmonoids overOptionalAndandOrmonoids overBoolean
1.5.5 - 2016-12-17
- semigroups and monoids moved under
fn2package
CoProductN#project, to project disjoint union types into tuples ofOptionalvaluesCoProductN#converge, to drop the magnitude of a coproduct down by one typetoCollectionandsize
1.5.4 - 2016-11-27
Fn1/2#adaptto switch between lambda andjava.util.functiontypes more easilyeq,head,find, andtailBiPredicateMonoid#foldMapHMap#toMapto go from a heterogeneous map to ajava.util.Map
1.5.3 - 2016-11-06
SemigroupandMonoidEither#invertpartition- Generalized coproducts implemented as
CoProduct2throughCoProduct5 Eitheris now aCoProduct2
1.5.2 - 2016-09-24
Lensstatic factory method renaming
- Heterogeneous list indexes arrive via
Index
1.5.1 - 2016-08-30
- Independent
Lensparameter mapping viamapS,mapT,mapA, andmapB
1.5 - 2016-08-28
- Initial lens support with
LensandSimpleLenstypes andview,set, andoverfunctions ConstandIdentityfunctorsEither#toOptionalHMap#removeandHMap#removeAll
1.4 - 2016-08-08
- All function input values become
java.util.functiontypes, and all function output values remain lambda types, for better compatibility
1.3 - 2016-07-31
Profunctorinheritance hierarchy- Renaming
IdentitytoId Monadic/Dyadic/TriadicFunctionis nowFn1/2/3
HListspecializations support random access lookup
1.2 - 2016-06-27
Tuples moved underHListas specialized subtypes
Either#peekHMap, heterogeneous mapsTuple2is now also aMap.Entry
1.1 - 2016-06-21
- Better interoperability between lambda and
java.util.functiontypes
scanLeftHList, heterogeneous lists- Added up to
Tuple5 Either, specialized coproduct with success/failure semantics
1.0 - 2015-12-29
- Initial implementation of first-class curried functions
all,any,cartesianProduct,cycle,drop,dropWhile,filter,foldLeft,foldRight,inGroupsOf,map,partial2,partial3,reduceLeft,reduceRight,repeat,take,takeWhile,unfoldrMonadic/Dyadic/TriadicFunction,Predicate,Tuple2,Tuple3Functor,BiFunctor,ProFunctor