asyn_iter
Module Reference
amap(f, xs)
async
asyncify(xs)
async
batch(batch_size, xs, yield_remaining=True)
async
Batch elements of xs
into tuples of size batch_size
Source code in haskellian/src/haskellian/asyn_iter/funcs.py
enumerate(xs)
async
every(n, xs)
async
Take every n
th element of xs
- every(3, arange(10)) == AsyncIter([0, 3, 6, 9])
Source code in haskellian/src/haskellian/asyn_iter/funcs.py
filter(p, xs)
async
flatmap(f, xs)
async
flatten(xxs)
async
head(xs)
async
map(f, xs)
async
skip(n, xs)
async
split(n, xs)
async
starmap(f, xs)
async
syncify(xs)
async
take(n, xs)
async
Take the first n
elements of xs
Source code in haskellian/src/haskellian/asyn_iter/funcs.py
lift(f)
Lift a function f
to return an AsyncIter
Source code in haskellian/src/haskellian/asyn_iter/lifting.py
ManagedAsync
Bases: AsyncIter[A]
, Generic[A]
Managed async iterator
Source code in haskellian/src/haskellian/asyn_iter/managed.py
prefetched(prefetch, xs)
Prefetch prefetch
elements from xs
- If prefetched < 1
, it'll be clipped to 1