Created
February 22, 2015 12:27
-
-
Save goura/b07a2d895cb493e504d8 to your computer and use it in GitHub Desktop.
random kuku
This file contains 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 ( | |
"fmt" | |
) | |
type IntInt struct { | |
A int | |
B int | |
} | |
func main() { | |
type mis map[IntInt]struct{} | |
m := mis{} | |
for i := 1; i < 10; i++ { | |
for j := 1; j < 10; j++ { | |
m[IntInt{i, j}] = struct{}{} | |
} | |
} | |
// Map iteration offset is random in Go | |
// https://codereview.appspot.com/5285042/patch/9001/10003 | |
for key, _ := range m { | |
fmt.Printf("%d x %d\n", key.A, key.B) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment