std/pipeline
模块 zio.pipeline — Data pipeline DSL (MVP) · 1 个符号
S-expression pipeline declarations that macro-expand into plain filter/map/count calls (design spec §10.3). The DSL owns no engine, no data types, and no side-effect permissions — capabilities belong to the functions it expands to.
(pipeline xs
(filter pred?)
(map transform)
(aggregate count)
(emit printer))
MVP stages: filter, map, aggregate (count), emit. Unknown stages and non-count aggregates expand into (error ...) calls that raise at runtime; expansion-time rejection is Planned, not current behavior.
概览
pipeline
(defmacro pipeline [src & stages] …)
pipeline — 将流水线阶段宏展开为对 src 的嵌套 filter/map/count 调用。
支持的阶段:(filter pred)、(map f)、(aggregate count)、 (emit f)(展开为 (f src))。未知阶段或非 count 的聚合展开为 (error ...) 调用,在运行时报错。DSL 自身不拥有引擎、数据类型 或副作用权限,能力属于其展开目标函数。
(pipeline xs
(filter pred?)
(map transform)
(aggregate count)
(emit printer))