This commit is contained in:
Noa Aarts 2025-12-14 10:51:02 +01:00
parent e9cf83145f
commit 3386de9894
Signed by: noa
GPG key ID: 1850932741EFF672
7 changed files with 143 additions and 1 deletions

21
main.py Executable file
View file

@ -0,0 +1,21 @@
#!/usr/bin/env python
from math import log2
from qas_flow import Stream
def gen():
n = 0
while True:
yield n
n += 1
def mapfunc(ix):
i, x = ix
return str(x) * int(log2(i + 1))
strm = Stream(gen())
print(strm.enumerate().map(mapfunc).skip(20).take(4).enumerate().collect())