MCPcopy Create free account
hub / github.com/benbjohnson/immutable / Delete

Method Delete

immutable_test.go:1344–1356  ·  view source on GitHub ↗
(k int)

Source from the content-addressed store, hash-verified

1342}
1343
1344func (m *TMap) Delete(k int) {
1345 m.prev = m.im
1346 m.im = m.im.Delete(k)
1347 m.builder.Delete(k)
1348 delete(m.std, k)
1349
1350 for i := range m.keys {
1351 if m.keys[i] == k {
1352 m.keys = append(m.keys[:i], m.keys[i+1:]...)
1353 break
1354 }
1355 }
1356}
1357
1358func (m *TMap) Validate() error {
1359 for _, k := range m.keys {

Callers 11

TestMap_DeleteFunction · 0.45
TestMap_LimitedHashFunction · 0.45
BenchmarkMap_DeleteFunction · 0.45
ExampleMap_DeleteFunction · 0.45
ExampleMapBuilder_DeleteFunction · 0.45
DeleteMethod · 0.45
ExampleSortedMap_DeleteFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected