diff --git a/SliceTricks.md b/SliceTricks.md index e9a5fc0b..20cc0331 100644 --- a/SliceTricks.md +++ b/SliceTricks.md @@ -14,9 +14,9 @@ copy(b, a) // These two are often a little slower than the above one, // but they would be more efficient if there are more -// elements to be appended to b. +// elements to be appended to b after copying. b = append([]T(nil), a...) -b = append(a[:0:0], a... +b = append(a[:0:0], a...) ``` #### Cut