Tech Challenge
2026-10-15
🦀
Daily Tech Challenge
Rust
medium
Question 1 of 5
What does this program print, building a Vec by chaining std::iter::once with other iterables?
Example
use std::iter;
fn main() {
let v: Vec<i32> = iter::once(0)
.chain(vec![5, 6])
.chain(iter::once(9))
.collect();
println!("{:?}", v);
}Thursday, October 15, 2026 · A new challenge drops every day