Skip to content

Releases: fp4php/functional

Release v4.7.0

08 Dec 11:47

Choose a tag to compare

  • Add lastOf operation for Seq and NonEmptySeq

Release v4.6.0

01 Dec 20:33

Choose a tag to compare

  • mkString operation for Seq and Stream
>>> 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

01 Dec 10:03

Choose a tag to compare

  • toAssocArray cast for Map
>>> 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

30 Nov 08:50

Choose a tag to compare

  • toNonEmptyArrayList cast for Stream and Seq
  • singleton and empty collectors for Seq

Release v4.3.0

23 Nov 20:26

Choose a tag to compare

Release v4.2.0

02 Oct 12:02

Choose a tag to compare

  • intersperse and zip operations have been added for Seq implementations
  • Drop traits
  • Move collection and stream operation implementations into independent classes

Release v4.1.1

21 Sep 18:40

Choose a tag to compare

  • Make all REPL examples IDE friendly
  • Drop nonexistent in old Psalm versions method usage

Release v4.1.0. Streams and Map as static storage

17 Sep 16:13

Choose a tag to compare

  • Stream class has been added. See Streams overview
  • Map/NonEmptyMap static storage support has been added. See README.md examples
  • Option::filterOf has been added
  • Option::tap has been added
  • Option::flatTap has been added
  • Unnecessary dev dependencies are dropped

Release v4.0.1 Bug fix

09 Sep 15:48

Choose a tag to compare

  • Fix at function bug
  • Option::condLazy has been added
  • Either::condLazy has been added
  • Validated::condLazy has been added

Release v4.0.0

08 Sep 21:30

Choose a tag to compare

  • Option::cond method has been added
  • tap collection operation has been added
  • Set::subsetOf, NonEmptySet::subsetOf operations have been added
  • Seq::sorted, NonEmptySeq::sorted methods have been added
  • objectOf and classOf functions have been added
  • Fix Either::try method unsoundness. Change Left type up to Throwable
  • Drop deprecated isSequence function
  • Replace any, anyOf with exists, existsOf
  • Fix exists function unsoundness. Change needle with just predicate callable.
  • Drop deprecated reduceNel, reduceNer functions
  • Fix fold and reduce function signatures
  • pluck function plugin support for object-like arrays
  • NonEmptySeqOps::groupBy operation has been added
  • Additional cast operations for collections
  • partitionOf return type generalization via psalm plugin
  • Map::get method return type refining from Option to Some for literal key types
  • Fix Map::every signature. Replace Value+key arguments with Entry argument
  • Add explicit getIterator methods for interfaces for better foreach support
  • NonEmptyHashMap has been added
  • Drop Semigroup and Monoid instance fabric methods from abstract classes
  • Drop getNamedTypes function.
  • Semigroup and Monoid instances for collection classes
  • filterMap operation has been added [by @klimick]
  • Rename group function to groupBy
  • Change tail function return type from array to list
  • Rename Map::reindex to Map::mapKeys. Add Map::mapValues alias for Map::map method
  • Psalm plugin for conditionally pure functions [by @klimick]
  • Drop butLast function
  • Replace IndexedSeq and LinearSeq interfaces with just Seq interface
  • Replace NonEmptyIndexedSeq and NonEmptyLinearSeq interfaces with just NonEmptySeq interface
  • Rename $rhs to $that for HashContract
  • Replace EmptyCollectionException with Option for non-empty collect methods
  • Rename HashMap::collecIterable to HashMap::collect and HashMap::collect to HashMap::collectPairs