Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

iterator adapter

A method that wraps an iterator to change what it produces, like map or filter.

An adapter is a lazy method that takes an iterator and returns a new iterator (map, filter, enumerate, zip, take, skip, flat_map, peekable).

Loading interactive…

Examples

  • steps.iter().enumerate().filter(|(_, s)| **s >= 10_000) builds a new iterator of (day, steps) pairs; nothing runs until a consumer pulls from it.

Read the full section →