Changed the fib function to a generator to make it more readable,
concise and hopefully faster.