grol-io / grol

Go REPL Open Language
https://grol.io
Apache License 2.0
22 stars 2 forks source link

url escape bug #213

Closed ldemailly closed 1 month ago

ldemailly commented 1 month ago

trying to share

func primesGen(mx){sieve=[true]*mx num=2 cp=2 nextPrime=()=>{for cp<mx{if sieve[cp]{prime=cp cp++mult=prime*prime for max(mx-mult,0){if mult%prime==0{sieve[mult]=false}mult++}return prime}else{cp++}}}}maxS=10_000 primeIter=primesGen(maxS) p=0 for p<=maxS{p=primeIter() print(" ",p)}

probably the %