I'm playing around with Go language, using its online playground.
package main
import "fmt"
func main() {
primes := [6]int{2, 3, 5, 7, 11, 13}
var s []int = primes[1:6]
fmt.Println(s)
}
This code prints nothing. Changing slice range to something else, for instance to [2:6]
works as expected. I have tried it only using Go playground. Check it here.
Why it doesn't print anything? Probably it can be a Go compiler or Go playground bug, however I don't know the language so I'm not sure.