Releases: fp4php/functional
Releases · fp4php/functional
Release v4.7.0
- Add
lastOfoperation forSeqandNonEmptySeq
Release v4.6.0
mkStringoperation forSeqandStream
>>> LinkedList::collect([1, 2, 3])->mkString()
=> '1,2,3'
>>> LinkedList::collect([1, 2, 3])->mkString("(", ",", ")")
=> '(1,2,3)'
>>> LinkedList::collect([])->mkString("(", ",", ")")
=> '()'Release v4.5.0
toAssocArraycast forMap
>>> HashMap::collectPairs([['a', 1], ['b', 2]])->toAssocArray();
=> Some(['a' => 1, 'b' => 2])
>>> ArrayList::collect([['a', 1], ['b', 2]])->toHashMap(fn($entry) => entry)->toAssocArray();
=> Some(['a' => 1, 'b' => 2])
>>> HashMap::collectPairs([[new Foo(), 1], [new Foo(), 2]])->toAssocArray();
=> None
Release v4.4.0
toNonEmptyArrayListcast for Stream and Seqsingletonandemptycollectors for Seq
Release v4.3.0
Release v4.2.0
intersperseandzipoperations have been added for Seq implementations- Drop traits
- Move collection and stream operation implementations into independent classes
Release v4.1.1
- Make all REPL examples IDE friendly
- Drop nonexistent in old Psalm versions method usage
Release v4.1.0. Streams and Map as static storage
Streamclass has been added. See Streams overviewMap/NonEmptyMapstatic storage support has been added. See README.md examplesOption::filterOfhas been addedOption::taphas been addedOption::flatTaphas been added- Unnecessary dev dependencies are dropped
Release v4.0.1 Bug fix
- Fix
atfunction bug Option::condLazyhas been addedEither::condLazyhas been addedValidated::condLazyhas been added
Release v4.0.0
Option::condmethod has been addedtapcollection operation has been addedSet::subsetOf,NonEmptySet::subsetOfoperations have been addedSeq::sorted,NonEmptySeq::sortedmethods have been addedobjectOfandclassOffunctions have been added- Fix
Either::trymethod unsoundness. Change Left type up toThrowable - Drop deprecated
isSequencefunction - Replace
any,anyOfwithexists,existsOf - Fix
existsfunction unsoundness. Change needle with just predicate callable. - Drop deprecated
reduceNel,reduceNerfunctions - Fix
foldandreducefunction signatures pluckfunction plugin support for object-like arraysNonEmptySeqOps::groupByoperation has been added- Additional cast operations for collections
partitionOfreturn type generalization via psalm pluginMap::getmethod return type refining from Option to Some for literal key types- Fix
Map::everysignature. Replace Value+key arguments withEntryargument - Add explicit
getIteratormethods for interfaces for betterforeachsupport NonEmptyHashMaphas been added- Drop
SemigroupandMonoidinstance fabric methods from abstract classes - Drop
getNamedTypesfunction. SemigroupandMonoidinstances for collection classesfilterMapoperation has been added [by @klimick]- Rename
groupfunction togroupBy - Change
tailfunction return type from array to list - Rename
Map::reindextoMap::mapKeys. AddMap::mapValuesalias forMap::mapmethod - Psalm plugin for conditionally pure functions [by @klimick]
- Drop
butLastfunction - Replace
IndexedSeqandLinearSeqinterfaces with justSeqinterface - Replace
NonEmptyIndexedSeqandNonEmptyLinearSeqinterfaces with justNonEmptySeqinterface - Rename
$rhsto$thatforHashContract - Replace
EmptyCollectionExceptionwithOptionfor non-empty collect methods - Rename
HashMap::collecIterabletoHashMap::collectandHashMap::collecttoHashMap::collectPairs