MCPcopy
hub / github.com/duke-git/lancet / ExampleOrderedMap_Front

Function ExampleOrderedMap_Front

maputil/map_example_test.go:598–612  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

596}
597
598func ExampleOrderedMap_Front() {
599 om := NewOrderedMap[string, int]()
600
601 om.Set("a", 1)
602 om.Set("b", 2)
603 om.Set("c", 3)
604
605 frontElement, ok := om.Front()
606 fmt.Println(frontElement)
607 fmt.Println(ok)
608
609 // Output:
610 // {a 1}
611 // true
612}
613
614func ExampleOrderedMap_Back() {
615 om := NewOrderedMap[string, int]()

Callers

nothing calls this directly

Calls 3

NewOrderedMapFunction · 0.85
SetMethod · 0.65
FrontMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…