Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
bpolaszek committed Apr 5, 2020
1 parent 72bc732 commit 8a0f64f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ interface SomeInterface
{
/**
* Return an iterable list of items
*
*
* @return iterable
*/
public function getItems(): iterable;
Expand Down Expand Up @@ -150,7 +150,7 @@ $isFruit = function ($eatable) {
return 'potato' !== $eatable;
};

var_dump(iterator_to_array(iterable($data)->withFilter($isFruit)->withMap('strtoupper'))); // ['banana', 'pineapple']
var_dump(iterator_to_array(iterable($data)->filter($isFruit)->map('strtoupper'))); // ['banana', 'pineapple']
```

Installation
Expand All @@ -170,4 +170,4 @@ Unit tests
==========
```
./vendor/bin/phpunit
```
```

0 comments on commit 8a0f64f

Please sign in to comment.