Playing with ranges

This commit is contained in:
Dan Buch 2012-08-25 21:12:40 -04:00
parent dd64e484a5
commit 92cd405b2e

13
gotime/src/ranges.go Normal file
View File

@ -0,0 +1,13 @@
package main
import "fmt"
func main() {
pow := make([]int, 10)
for i := range pow {
pow[i] = 1 << uint(i)
}
for _, value := range pow {
fmt.Printf("%d\n", value)
}
}