Skip to content

Commit

Permalink
fix: find operation
Browse files Browse the repository at this point in the history
Use `Current` operation
  • Loading branch information
drupol committed Jan 15, 2023
1 parent 1aca436 commit 50d416a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Operation/Find.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ static function (callable ...$callbacks) use ($default): Closure {
/** @var Closure(iterable<TKey, T>): Generator<TKey, T|V> $pipe */
$pipe = (new Pipe())()(
(new Filter())()(...$callbacks),
(new Append())()([$default]),
(new Head())(),
(new Current())()(0)($default)
);

// Point free style.
Expand Down

0 comments on commit 50d416a

Please sign in to comment.