Skip to content

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Aug 19, 2019
1 parent 748a618 commit 831850e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ $square = new class() extends Operation {
*/
public function run(CollectionInterface $collection): CollectionInterface
{
return Collection::withClosure(
return Collection::with(
static function () use ($collection) {
foreach ($collection as $item) {
yield $item ** 2;
Expand Down Expand Up @@ -222,8 +222,6 @@ about the kind of parameters they require.
| `range` | new Collection object | [Collection.php](./src/Collection.php)
| `times` | new Collection object | [Collection.php](./src/Collection.php)
| `with` | new Collection object | [Collection.php](./src/Collection.php)
| `withArray` | new Collection object | [Collection.php](./src/Collection.php)
| `withClosure` | new Collection object | [Collection.php](./src/Collection.php)

All those methods are not described in [the Collection interface](./src/Contract/Collection.php),
but in the [Collection class](./src/Collection.php) itself, feel free to check it out to know more about the kind of parameters they require.
Expand Down

0 comments on commit 831850e

Please sign in to comment.