A generator, duck typing, and a branchless conditional walk into a bar.
Follow @mathsppblog on X/Twitter!