/** * Because of the way slices are handled in Go * it is possible to create a slice that contains * pieces of itself!!! * And to do so with descent into recursion * madness! Restriction, the piece of the slice * cannot include the location in the slice at which * the price is stored! * * Created Oct 4, 2022 gtowell */ package main import "fmt" func main() { //First make a slice with some pre-allocated space var tt = make([]interface{}, 10) // fill it with something tt[0]=0 tt[1]=1 tt[2]=2 fmt.Printf("tt %p\n", tt) tt[3]=tt[0:2] fmt.Printf("tt %v\n", tt) fmt.Printf("%p %p\n", tt, tt) }