Skip to content

Instantly share code, notes, and snippets.

@goura
Created February 22, 2015 12:27
Show Gist options
  • Save goura/b07a2d895cb493e504d8 to your computer and use it in GitHub Desktop.
Save goura/b07a2d895cb493e504d8 to your computer and use it in GitHub Desktop.
random kuku
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