package main import "code.google.com/p/go-tour/pic" func Pic(dx, dy int) [][]uint8 { result := make([][]uint8, dy) for j := 0; j < dy; j++ { result[j] = make([]uint8, dx) for i := 0; i < dx; i++ { result[j][i] = uint8(i) ^ uint8(j) } } return result } func main() { pic.Show(Pic) }