1package lib 2 3type FMap[K comparable, V comparable] map[K]V 4 5//go:noinline 6func (m FMap[K, V]) Flip() FMap[V, K] { 7 out := make(FMap[V, K]) 8 return out 9} 10 11type MyType uint8 12 13const ( 14 FIRST MyType = 0 15) 16 17var typeStrs = FMap[MyType, string]{ 18 FIRST: "FIRST", 19} 20 21func (self MyType) String() string { 22 return typeStrs[self] 23} 24