| @@ 65-73 (lines=9) @@ | ||
| 62 | return new static($items); |
|
| 63 | } |
|
| 64 | ||
| 65 | public function remove(Equatable $value): EquatableMap |
|
| 66 | { |
|
| 67 | $key = $this->search($value); |
|
| 68 | $items = $this->items; |
|
| 69 | ||
| 70 | unset($items[$key]); |
|
| 71 | ||
| 72 | return new static($items); |
|
| 73 | } |
|
| 74 | ||
| 75 | public function replace(string $key, Equatable $value): EquatableMap |
|
| 76 | { |
|
| @@ 61-69 (lines=9) @@ | ||
| 58 | return new static($items); |
|
| 59 | } |
|
| 60 | ||
| 61 | public function remove(Equatable $value): EquatableVector |
|
| 62 | { |
|
| 63 | $index = $this->search($value); |
|
| 64 | $items = $this->items; |
|
| 65 | ||
| 66 | unset($items[$index]); |
|
| 67 | ||
| 68 | return new static($items); |
|
| 69 | } |
|
| 70 | ||
| 71 | public function replace(int $index, Equatable $value): EquatableVector |
|
| 72 | { |
|