Samples
Samples
exercise-fibonacci-closure
Language: Gold, Platform: Echoes, Category: Tour of Go
https://github.com/remobjects/ElementsSamples/tree/master/Gold/Echoes/Tour of Go/exercise-fibonacci-closure
-
exercise-fibonacci-closure.Echoes
-
References
- #
- Source Files
-
Other Files
-
References
exercise-fibonacci-closure.go
// Ignored build directive: +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())
}
}
