Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Friday, Dec 4.Claim the deal

Design a custom iterator that filters elements from a provided list based on a specified filter function F(n)F(n). The iterator should return only the elements that satisfy the filter condition (considered "valid") while preserving their original order.

Stdout
-