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