Skip to main content

Practice · 2 of 3

A Stateful Fibonacci Generator

CHALLENGE
Difficulty: advanced+25 XP

With your Generator<T> from the previous exercise, implement fibonacci(n) yielding the first n Fibonacci numbers (1, 1, 2, 3, 5, ...).

Back to lesson: Practice: Hands on the Handle