Aug-23-2018, 08:39 PM
return instead of yield would exit the function and forget about a and b (try it!). yield will return a value while retaining the state of the function in memory until the next time fib() is called. It will therefore remember what a and b were since the last time the function ran.