mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
Clarify in-place deduplicate, after having being bitten by copying all-but-print statement
parent
bea438646a
commit
d8e8a7f56c
@ -184,5 +184,6 @@ for i := 1; i < len(in); i++ {
|
||||
j++
|
||||
in[i], in[j] = in[j], in[i]
|
||||
}
|
||||
fmt.Println(in[:j+1]) // [1 2 3 4]
|
||||
result := in[:j+1]
|
||||
fmt.Println(result) // [1 2 3 4]
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user