CS373 Fall 2021: Week 8

def primes():
def filterdiv(p, xs):
return filter(lambda x: x % p, xs)
nums = itertools.count(2)
while True:
p = next(nums)
nums = filterdiv(p, nums)
yield p

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Create coc.nvim extension to improve vim experience

10 Years of Raspberry Pi

Using Flow to build After Create or Update Trigger

9 Useful Ways to Quickly Fix Outlook Error 0x800CCC0E

9 Useful Ways to Quickly Fix Outlook Error 0x800CCC0E

Securing REST API with Spring Security, JWT, and JPA

Difference Between DevOps and Agile

TableViews — iOS #14

FlexSlider and the product page of the Shopify Narrative theme

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ethan Tan

Ethan Tan

More from Medium

"Comparing my current version with 2 weeks younger version"

Visualizing your experience

Knives Legacy — Royalties

Examining the Viability of Virtual Exhibitions