github.com/m4gshm/gollections@v0.0.13-0.20240331203319-a34a86e58a24/map_/clone/api.go (about)

     1  // Package clone provides map clone aliases
     2  package clone
     3  
     4  import "github.com/m4gshm/gollections/map_"
     5  
     6  // Of - synonym of the map_.Clone
     7  func Of[M ~map[K]V, K comparable, V any](elements M) M {
     8  	return map_.Clone(elements)
     9  }
    10  
    11  // Deep - synonym of the map_.DeepClone
    12  func Deep[M ~map[K]V, K comparable, V any](elements M, valCopier func(V) V) M {
    13  	return map_.DeepClone(elements, valCopier)
    14  }