Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for EqualMap (0.06 sec)

  1. test/typeparam/issue51840.go

    	lo uint64
    	z  *byte
    }
    
    func EqualMap[M1, M2 ~map[K]V, K, V comparable](m1 M1, m2 M2) bool {
    	for k, v1 := range m1 {
    		if v2, ok := m2[k]; !ok || v1 != v2 {
    			return false
    		}
    	}
    	return true
    }
    
    type Set[T comparable] map[T]struct{}
    
    func NewSet[T comparable](items ...T) Set[T] {
    	return nil
    }
    
    func (s Set[T]) Equals(other Set[T]) bool {
    	return EqualMap(s, other)
    }
    
    func main() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 10 19:40:04 UTC 2022
    - 635 bytes
    - Viewed (0)
Back to top