Innmind\Immutable\Sequence::sink()
Innmind\Immutable\Attempt
Innmind\Immutable\Maybe::memoize()
andInnmind\Immutable\Either::memoize()
was only unwrapping the first layer of the monad. It now recursively unwraps until all the deferred monads are memoized.
Innmind\Immutable\Map::toSequence()
- Use
static
closures as much as possible to reduce the probability of creating circular references by capturing$this
as it can lead to memory root buffer exhaustion. - Remove keeping intermediary values of a deferred
Sequence
that is referenced by no one.
Innmind\Immutable\State
Innmind\Immutable\Fold
- Using
string
s orint
s as aMap
key type and then adding keys of different types was throwing an error.
Innmind\Immutable\Sequence::chunk()
Innmind\Immutable\Identity::lazy()
Innmind\Immutable\Identity::defer()
Innmind\Immutable\Identity::toSequence()
Innmind\Immutable\Sequence::toIdentity()
returns a lazy, deferred or in memoryIdentity
based on the kind ofSequence
Innmind\Immutable\Sequence::prepend()
Innmind\Immutable\Identity
Innmind\Immutable\Sequence::toIdentity()
- A lazy
Sequence::takeEnd()
no longer loads the whole sequence in memory, only the number of elements taken + 1.
Innmind\Immutable\Set::unsorted()
Innmind\Immutable\Validation
Innmind\Immutable\Set::match()
Innmind\Immutable\Predicate\OrPredicate
Innmind\Immutable\Predicate\AndPredicate
Innmind\Immutable\Predicate\Instance::or()
Innmind\Immutable\Predicate\Instance::and()
- Registered cleanup callbacks for lazy
Sequence
s andSet
s are all called now for composed structures, instead of the last one
Innmind\Immutable\Str
only useInnmind\Immutable\Str\Encoding
to represent the encoding to work with
Fixtures\Innmind\Immutable\Map
Innmind\Immutable\Str\Encoding
Innmind\Immutable\Str
now implements\Stringable
- Most
Innmind\Immutable\Str
methods now also accept\Stringable
innmind/black-box
updated to version5
- Support for PHP
8.0
and8.1
- All
reduce
methods now explicit the fact that the callable may not be called when the structure is empty
- A lazy
Sequence::slice()
no longer loads the whole underlyingGenerator
Innmind\Immutable\Set::matches()
,Innmind\Immutable\Sequence::matches()
andInnmind\Immutable\Map::matches()
no longer iterates over all elements when one value doesn't match the predicate- When using
yield from
in theGenerator
passed toSequence::lazy()
values may be lost on certain operations
Innmind\Immutable\Either::flip()
Innmind\Immutable\Maybe::toSequence()
Innmind\Immutable\Maybe::eitherWay()
Innmind\Immutable\Either::eitherWay()
Innmind\Immutable\Maybe::memoize()
Innmind\Immutable\Either::memoize()
Innmind\Immutable\Sequence::memoize()
Innmind\Immutable\Set::memoize()
Innmind\Immutable\Sequence::toSet()
Innmind\Immutable\Sequence::dropWhile()
Innmind\Immutable\Sequence::takeWhile()
- Monads templates are now covariant
Innmind\Immutable\Sequence::aggregate()
Innmind\Immutable\Fold
Innmind\Immutable\Str::maybe()
Innmind\Immutable\Maybe::defer()
Innmind\Immutable\Either::defer()
->get()
,->first()
,->last()
,->indexOf()
and->find()
calls on a deferred or lazyInnmind\Immutable\Sequence
will now return a deferredInnmind\Immutable\Maybe
Innmind\Immutable\Sequence::last()
returnedInnmind\Immutable\Maybe::nothing()
when the last value wasnull
, now it returnsInnmind\Immutable\Maybe::just(null)
- Support lazy and deferred
Set::flatMap()
Innmind\Immutable\Sequence::safeguard
Innmind\Immutable\Set::safeguard
Innmind\Immutable\Set::remove()
no longer unwraps deferred and lazySet
s- Fix calling unnecessary methods for some
Set
operations
- Fixed
Sequence::lazyStartingWith()
return type declaration
Innmind\Immutable\Sequence::lazyStartingWith()
Innmind\Immutable\Map::exclude()
Innmind\Immutable\Maybe::exclude()
Innmind\Immutable\Maybe::keep()
Innmind\Immutable\Sequence::exclude()
Innmind\Immutable\Sequence::keep()
Innmind\Immutable\Set::exclude()
Innmind\Immutable\Set::keep()
Innmind\Immutable\Predicate
Innmind\Immutable\Predicate\Instance
Innmind\Immutable\Sequence::zip()
Innmind\Immutable\Maybe::either()
Innmind\Immutable\Either::maybe()
Innmind\Immutable\Monoid
interfaceInnmind\Immutable\Monoid\Concat
Innmind\Immutable\Monoid\Append
Innmind\Immutable\Monoid\MergeSet
Innmind\Immutable\Monoid\MergeMap
Innmind\Immutable\Sequence::fold(Innmind\Immutable\Monoid)