+ 2
Why this code ends and print 4? Instead of a StackOverFlow Exception
3 Respuestas
+ 2
The Func object is passed as a parameter of the Four function, but in the body of the Four function it is never executed in the Func object passed as a parameter. The only thing that is done in the body of the Four function is to return 4.
+ 1
It must be beacuse the function infinity is never actually excecuted, but I don't quite understand why.
+ 1
Yeah that's what I thought, since you pass infinity that's just the func declaration, you don't actually invoke that function inside the Four function body