Last active
December 15, 2016 13:57
-
-
Save groz/1ec9b9dd23c31af1845c1a88214930ad to your computer and use it in GitHub Desktop.
Go maps and ranges
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 "fmt" | |
func main() { | |
m := make(map[int]int) | |
m[1] = 0 | |
for k, v := range m { | |
m[k + k] = v | |
} | |
fmt.Println(m) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment