Created
July 13, 2014 01:38
-
-
Save jsutlovic/d965c49da078eedf4f9c to your computer and use it in GitHub Desktop.
Go Tour #38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "code.google.com/p/go-tour/pic" | |
func Pic(dx, dy int) [][]uint8 { | |
p := make([][]uint8, dy) | |
for y := range p { | |
p[y] = make([]uint8, dx) | |
for x := range p[y] { | |
p[y][x] = uint8((y ^ x)) | |
} | |
} | |
return p | |
} | |
func main() { | |
pic.Show(Pic) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment