Add pipe-buffered function
Implements `pipe-buffered`, a new primitive that allows accumulating values from multiple input streams into internal series buffers before executing a user-provided lambda. This is useful for implementing lookback logic and ensuring that the lambda only executes when sufficient data is available in all input streams. The function takes a `lookback` integer, input streams, and a lambda. The lambda receives `Series` objects for each input, allowing indexed access to past values. The `pipe-buffered` function manages the buffering and fill-gate logic.
This commit is contained in:
+3
-2
@@ -200,9 +200,10 @@ fn test_pipe_buffered_lambda_params_are_series() {
|
||||
)";
|
||||
let dump = env.dump_ast(source).expect("dump_ast failed");
|
||||
|
||||
// Lambda param should be Series<Record>, not just Record or Any
|
||||
// Lambda param should be Series<Record>, not just Record or Any.
|
||||
// The AST dump uses Debug format: "Series(Record(...))"
|
||||
assert!(
|
||||
dump.contains("series<"),
|
||||
dump.contains("Series(Record("),
|
||||
"Lambda param should be typed as Series, not raw value.\nDump:\n{dump}"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user