Skip to content

Commit

Permalink
refactor: Use Reduce operation in Reverse operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jul 12, 2021
1 parent d18d2b2 commit ca6c295
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Operation/Reverse.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ public function __invoke(): Closure
/** @var Closure(Iterator<TKey, T>): Generator<TKey, T> $pipe */
$pipe = Pipe::of()(
Pack::of(),
Reduction::of()($callback)([]),
Last::of(),
Reduce::of()($callback)([]),
Unpack::of(),
);

Expand Down

0 comments on commit ca6c295

Please sign in to comment.