package utils

func UniqueT[T comparable](list []T) []T {
	m := make(map[T]struct{})
	result := make([]T, 0, len(list))
	for _, v := range list {
		if _, exists := m[v]; !exists {
			m[v] = struct{}{}
			result = append(result, v)
		}
	}
	return result
}
