fn printer() {
    let collected = [];

    for _ in 0..2 {
        let out = yield;
        println!("{:?}", out);
        collected.push(out);
    }

    assert_eq!(collected, ["John", (1, 2, 3)]);
}

let printer = printer();
printer.resume(());
printer.resume("John");
printer.resume((1, 2, 3));
