Skip to main content

Practice · 1 of 1

A Consuming take() Adapter

CHALLENGE
Difficulty: advanced+25 XP

With your Generator<T> intact, implement take(Generator<int> src, int n) — a **move-only** function returning a Generator that yields at most n values from src. This grades the ownership rule: the adapter must own src by move.

Back to lesson: Practice: Coroutine Lifetime Clinic