func DistinctP() string {
	return `
func Distinct<FTYPE>P(list []<TYPE>) bool {
	if len(list) == 0 {
		return false
	}
	s := make(map[<TYPE>]bool)
	for _, v := range list {
		if _, ok := s[v]; ok {
			return false
		}
		s[v] = true
	}
	return true
}
`
}
Distinct check
DistinctP is template.
package basic
func Distinct() string {
	return `
func Distinct<FTYPE>(list []<TYPE>) []<TYPE> {
	var newList []<TYPE>
	s := make(map[<TYPE>]struct{}, len(list))
	for _, v := range list {
		if _, ok := s[v]; ok {
			continue
		}
		s[v] = struct{}{}
		newList = append(newList, v)
	}
	return newList
}
`
}
func Distinct2() string {
	return `
func Distinct<FTYPE>(list []<TYPE>) []<TYPE> {
	if len(list) == 0 {
		return []<TYPE>{}
	}
	newList := []<TYPE>{list[0]}
	for i := 1; i < len(list); i++ {
		found := false
		for j := 0; j < len(newList); j++ {
			if reflect.DeepEqual(list[i], newList[j]) {
				found = true
				break
			}
		}
		if !found {
			newList = append(newList, list[i])
		}
	}
	return newList
}
`
}
func DistinctPtr() string {
	return `
func Distinct<FTYPE>Ptr(list []*<TYPE>) []*<TYPE> {
	var newList []*<TYPE>
	s := make(map[<TYPE>]struct{}, len(list))
	for _, v := range list {
		if _, ok := s[*v]; ok {
			continue
		}
		s[*v] = struct{}{}
		newList = append(newList, v)
	}
	return newList
}
`
}
func DistinctPtr2() string {
	return `
func Distinct<FTYPE>Ptr(list []*<TYPE>) []*<TYPE> {
	if len(list) == 0 {
		return []*<TYPE>{}
	}
	newList := []*<TYPE>{list[0]}
	for i := 1; i < len(list); i++ {
		found := false
		for j := 0; j < len(newList); j++ {
			if reflect.DeepEqual(*list[i], *newList[j]) {
				found = true
				break
			}
		}
		if !found {
			newList = append(newList, list[i])
		}
	}
	return newList
}
`
}