Utilities · zero-dependency · MIT

larzpipe

Lazy composable pipelines.

Compose lazy data pipelines — map, filter, reduce and more — that stay re-iterable, for readable stream processing without loading everything into memory.

larzscript pkg install pipe
View on GitHub →Learn the stack

What you get

Try it

import "pipe" as pipe
let p = pipe.from_(range(10))
let doubled_evens = pipe.filter(pipe.map(p, fn(x) { return x * 2 }), fn(x) { return x % 4 == 0 })
print(pipe.to_list(doubled_evens))
print(pipe.reduce(p, fn(acc, x) { return acc + x }, 0))
Output
[0, 4, 8, 12, 16]
45

Why it's in the Larz Stack

larzpipe is a real Larzscript package (larzscript pkg install pipe) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.