Sign in
go
/
website
/
b4564f4a8ce1a51d6c3e3c2571a1122924d525c7
/
.
/
_content
/
tour
/
moretypes
/
exercise-fibonacci-closure.go
blob: d5a4e0020ba6f42b373f49a56a50a03fb58ce4e1 [
file
] [
log
] [
blame
]
// +build no-build OMIT
package main
import "fmt"
// fibonacci is a function that returns
// a function that returns an int.
func fibonacci() func() int {
}
func main() {
f := fibonacci()
for i := 0; i < 10; i++ {
fmt.Println(f())
}
}