Skip to content

Instantly share code, notes, and snippets.

View ttappr's full-sized avatar

Tap ttappr

View GitHub Profile
@ttappr
ttappr / iter_map.rs
Last active June 15, 2021 23:12 — forked from rust-play/playground.rs
Code shared from the Rust Playground
// https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=2ee2730c58035b41d18b7b07d64b9342
//! A generic implementation for an iterator generating function implemented on
//! `IntoIterator`. `.iter_map()` takes a callback as its parameter. This
//! callback gets invoked on each `.next()` invocation and receives a mutable
//! ref to an internal iterator.
//!
//! ```no_run
//! use iter_map::*;