Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
samber committed Jan 24, 2025
1 parent c32746c commit 625c925
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ lop.Map([]int64{1, 2, 3, 4}, func(x int64, _ int) string {

### UniqMap

UniqMap manipulates a slice and transforms it to a slice of another type with unique values.
Manipulates a slice and transforms it to a slice of another type with unique values.

```go
type User struct {
Expand All @@ -357,7 +357,7 @@ type User struct {
}
users := []User{{Name: "Alex", Age: 10}, {Name: "Alex", Age: 12}, {Name: "Bob", Age: 11}, {Name: "Alice", Age: 20}}

names := UniqMap(users, func(u User, index int) string {
names := lo.UniqMap(users, func(u User, index int) string {
return u.Name
})
// []string{"Alex", "Bob", "Alice"}
Expand Down

0 comments on commit 625c925

Please sign in to comment.