Skip to content

Commit

Permalink
refactor: Simplify MatchOne operation - Add missing typing informat…
Browse files Browse the repository at this point in the history
…ions.
  • Loading branch information
drupol committed Oct 25, 2021
1 parent 95ee27c commit f66b407
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Operation/MatchOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ static function (callable ...$callbacks) use ($matchers): Closure {
/** @var Closure(Iterator<TKey, T>): Generator<TKey, bool> $pipe */
$pipe = Pipe::of()(
Map::of()(
/**
* @param T $value
* @param TKey $key
* @param Iterator<TKey, T> $iterator
*/
static fn ($value, $key, Iterator $iterator): bool => CallbacksArrayReducer::or()($callbacks, $value, $key, $iterator) === CallbacksArrayReducer::or()($matchers, $value, $key, $iterator)
),
DropWhile::of()(static fn (bool $value): bool => false === $value),
Expand Down

0 comments on commit f66b407

Please sign in to comment.