scope 2

What does the following program print?
package main

var f = func(x int) {}

func Bar() {
	f := func(x int) {
		if x >= 0 {
			print(x)
			f(x - 1)
		}
	}
	f(2)
}

func Foo() {
	f = func(x int) {
		if x >= 0 {
			print(x)
			f(x - 1)
		}
	}
	f(2)
}

func main() {
	Bar()
	print(" | ")
	Foo()
}

Choices:

Answer: 2 | 210

Run it on Go play.

Key points:

Please read code blocks and identifier scopes for more detailed explanations.