>>107570546
use std::collections::HashSet;
fn main() {
let result: i64 = (1..=20)
.map(|x| x * x)
.inspect(|x| println!("square: {x}"))
.filter(|x| x % 2 == 0)
.flat_map(|x| (x - 2..=x + 2))
.filter(|x| *x > 0)
.collect::<Vec<_>>()
.windows(3)
.map(|w| w.iter().sum::<i64>())
.filter(|sum| sum % 5 != 0)
.scan(HashSet::new(), |seen, x| {
Comment too long. Click here to view the full text.