From ed636a07e650dca787fcb19dc96981b37323a5c8 Mon Sep 17 00:00:00 2001 From: Reetuparna Mukherjee Date: Sun, 21 Jun 2020 01:22:32 +0530 Subject: [PATCH] Added explanation This is my first commit ever! --- transform.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transform.go b/transform.go index 369aef4..a0ad3b7 100644 --- a/transform.go +++ b/transform.go @@ -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++ }