Skip to content

Commit

Permalink
docs: Fix union doc
Browse files Browse the repository at this point in the history
  • Loading branch information
rudashi committed Oct 5, 2024
1 parent 480f56a commit 5f2e1f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/Set.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,13 @@ $evens->symmetricDifference($squares);

### Set::union()

The `union()` method returns a new Set containing elements from both Sets.
The `union()` method returns a new Set containing all elements from both Sets.

```php
$odds = new Set([1, 3, 5, 7, 9]);
$squares = new Set([1, 4, 9]);

$set->union($squares);
$odds->union($squares);
// Set[1, 3, 5, 7, 9, 4]
```

Expand Down

0 comments on commit 5f2e1f1

Please sign in to comment.