kota's memex

https://github.com/golang/go/wiki/SliceTricks

Basics

Slices represent variable-length sequences whose elements all have the same type. A slice type is written []T, where the elements have type T; it looks like an array type without a size. A slice is a lightweight data structure that gives access to some or all elements on an underlying array. Multiple slices can share the same backing array and refer to different subsections.

foods := []string{"peanut butter", "carrots", "nuts", "soy beans", "cookies"}
goodFoods := []string{foods[0], foods[len(foods)-1]}
fmt.Println(goodFoods)
// [peanut butter cookies]

Cut

a = append(a[:i], a[j:]...)