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

Method Set

immutable_test.go:1332–1342  ·  view source on GitHub ↗
(k, v int)

Source from the content-addressed store, hash-verified

1330}
1331
1332func (m *TMap) Set(k, v int) {
1333 m.prev = m.im
1334 m.im = m.im.Set(k, v)
1335 m.builder.Set(k, v)
1336
1337 _, exists := m.std[k]
1338 if !exists {
1339 m.keys = append(m.keys, k)
1340 }
1341 m.std[k] = v
1342}
1343
1344func (m *TMap) Delete(k int) {
1345 m.prev = m.im

Callers 15

TestListFunction · 0.45
SetMethod · 0.45
BenchmarkList_SetFunction · 0.45
BenchmarkListBuilder_SetFunction · 0.45
ExampleList_SetFunction · 0.45
ExampleListBuilder_SetFunction · 0.45
TestMap_SetFunction · 0.45
TestMap_OverwriteFunction · 0.45
TestMap_DeleteFunction · 0.45
TestMap_LimitedHashFunction · 0.45
BenchmarkMap_SetFunction · 0.45
BenchmarkMap_DeleteFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected