Skip to content

Commit

Permalink
Merge pull request #88 from reetuparna/documentation
Browse files Browse the repository at this point in the history
Added explanation
  • Loading branch information
thoas authored Jun 21, 2020
2 parents 1d24b29 + ed636a0 commit 149bba8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ func Uniq(in interface{}) interface{} {
}

seen[v] = true
// Edits the original to add only unique elements.
// If there are j unique elements in the input, it will be modified to contain the unique elements from
// from index 0 through j
value.Index(j).Set(val)
j++
}
Expand Down

0 comments on commit 149bba8

Please sign in to comment.