Skip to content

Commit

Permalink
Update for version v1.4.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
markrogoyski committed Feb 15, 2023
1 parent f9f3688 commit d6aba78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IterTools PHP Change Log

## v1.4.0 - TBD
## v1.4.0 - 2023-02-15

### New Features
* Single
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1528,11 +1528,11 @@ $boolean = Summary::exactlyN($ages, $n, $predicate);
### Is Partitioned
Returns true if all elements of given collection that satisfy the predicate appear before all elements that don't.

```Summary::isPartitioned(iterable $data, callable $predicate = null): bool```

- Returns true for empty collection or for collection with single item.
- Default predicate if not provided is the boolean value of each data item.

```Summary::isPartitioned(iterable $data, callable $predicate = null): bool```

```php
use IterTools\Summary;

Expand Down Expand Up @@ -2981,19 +2981,19 @@ $boolean = Stream::of($twoTruthsAndALie)->exactlyN($n);
##### Is Partitioned
Returns true if all elements of given collection that satisfy the predicate appear before all elements that don't.

```$stream->isPartitioned(callable $predicate = null): bool```

- Returns true for empty collection or for collection with single item.
- Default predicate if not provided is the boolean value of each data item.

```$stream->isPartitioned(callable $predicate = null): bool```

```php
use IterTools\Summary;

$numbers = [0, 2, 4, 1, 3, 5];
$evensBeforeOdds = fn ($item) => $item % 2 === 0;

$boolean = Stream::($numbers)
->isPartitioned($numbers, $evensBeforeOdds);
->isPartitioned($evensBeforeOdds);
// true
```

Expand Down

0 comments on commit d6aba78

Please sign in to comment.