|
|
|
|
|
by randomdata
3596 days ago
|
|
To be fair, even with a well designed interface, it is difficult to see the advantage of your example over using a simple for loop: func unique(list []int) (r []int) {
for i := range list {
if !includes(r, i) {
r = append(r, i)
}
}
return
}
|
|