Golang Fibonacci closure

June 22nd, 2017

Gopher Golang logo
Implement a fibonacci function that returns a function (a closure) that
returns successive Fibonacci numbers (0, 1, 1, 2, 3, 5, …).

(blogged from Vim)