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

Method clone

immutable.go:722–725  ·  view source on GitHub ↗

clone returns a shallow copy of m.

()

Source from the content-addressed store, hash-verified

720
721// clone returns a shallow copy of m.
722func (m *Map[K, V]) clone() *Map[K, V] {
723 other := *m
724 return &other
725}
726
727// Get returns the value for a given key and a flag indicating whether the
728// key exists. This flag distinguishes a nil value set on a key versus a

Callers 2

setMethod · 0.95
deleteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected