@@ -267,7 +267,7 @@ Quick Reference
267267| [ ` toProduct ` ] ( #To-Product-1 ) | Reduces stream to the product of its items | ` $stream->toProduct() ` |
268268| [ ` toString ` ] ( #To-String-1 ) | Reduces stream to joined string | ` $stream->toString([$separator], [$prefix], [$suffix]) ` |
269269| [ ` toSum ` ] ( #To-Sum-1 ) | Reduces stream to the sum of its items | ` $stream->toSum() ` |
270- | [ ` toRange ` ] ( #To-Random-Value-1 ) | Reduces stream to random value within it | ` $stream->toRandomValue() ` |
270+ | [ ` toRandomValue ` ] ( #To-Random-Value-1 ) | Reduces stream to random value within it | ` $stream->toRandomValue() ` |
271271| [ ` toRange ` ] ( #To-Range-1 ) | Reduces stream to difference of max and min values | ` $stream->toRange() ` |
272272| [ ` toValue ` ] ( #To-Value-1 ) | Reduces stream like array_reduce() function | ` $stream->toValue($reducer, $initialValue) ` |
273273
@@ -1356,7 +1356,7 @@ foreach (Set::union($a, $b, $c) as $item) {
13561356### Union Coercive
13571357Iterates the union of iterables with [ type coercion] ( #Strict-and-Coercive-Types ) .
13581358
1359- ``` Set::union (iterable ...$iterables) ```
1359+ ``` Set::unionCoercive (iterable ...$iterables) ```
13601360
13611361If input iterables produce duplicate items, then [ multiset] ( https://en.wikipedia.org/wiki/Multiset ) union rules apply.
13621362
@@ -1367,7 +1367,7 @@ $a = ['1', 2, 3];
13671367$b = [3, 4];
13681368$c = [1, 2, 3, 6, 7];
13691369
1370- foreach (Set::union ($a, $b, $c) as $item) {
1370+ foreach (Set::unionCoercive ($a, $b, $c) as $item) {
13711371 print($item);
13721372}
13731373//1, 2, 3, 4, 6, 7
@@ -1550,11 +1550,6 @@ $items = ['fingerprints', 'snowflakes', 'eyes', 'DNA']
15501550
15511551$boolean = Summary::allUnique($items);
15521552// true
1553-
1554- $isOnPlaystation = fn ($ff) => $ff >= 7 && $ff <= 9;
1555-
1556- $boolean = Summary::allMatch($finalFantasyNumbers, $isOnPlaystation);
1557- // false
15581553```
15591554
15601555### Any Match
@@ -3004,7 +2999,7 @@ $stream = Stream::of($input)
30042999#### Union Coercive With
30053000Return a stream consisting of the union of the stream and the input iterables using [ type coercion] ( #Strict-and-Coercive-Types ) .
30063001
3007- ``` $stream->unionWith (iterable ...$iterables): Stream ```
3002+ ``` $stream->unionCoerciveWith (iterable ...$iterables): Stream ```
30083003
30093004Note: If input iterables produce duplicate items, then [ multiset] ( https://en.wikipedia.org/wiki/Multiset ) union rules apply.
30103005
@@ -3014,7 +3009,7 @@ use IterTools\Stream;
30143009$input = [1, 2, 3];
30153010
30163011$stream = Stream::of($input)
3017- ->unionWith (['3', 4, 5, 6])
3012+ ->unionCoerciveWith (['3', 4, 5, 6])
30183013 ->toArray();
30193014// [1, 2, 3, 4, 5, 6]
30203015```
0 commit comments