We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Think about this scenario:
func main() { type User struct { Name string Age int } // find unique names of users users := []User{{Name:"Alice",Age: 10},{Name:"Alice",Age: 12},{Name:"Bob",Age: 13}} names := lo.Map(users,func(u User, index int) string { return u.Name }) names = lo.Uniq(names) fmt.Printf("%v\n", names) // [Alice Bob] }
To find unique names, I need use Map and Uniq helpers. For this scenario, I suppose to add UniqMap helper.
Map
Uniq
UniqMap
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Think about this scenario:
To find unique names, I need use
Map
andUniq
helpers. For this scenario, I suppose to addUniqMap
helper.The text was updated successfully, but these errors were encountered: