See https://godoc.org/github.com/bradfitz/slice