Files
RustAst/examples/soa_series.myc
T
Michael Schimmel 2457eec1bf feat: Implement Pipeline support
Adds support for pipelines, allowing streams to be chained together and
transformed.
This includes new types for `PipeStream` and `SourceAdapter`, along with
modifications
to the `Environment` to manage pipeline execution. A new example
`pipeline.myc`
demonstrates its usage.
2026-03-02 00:32:07 +01:00

16 lines
422 B
Plaintext

;; Output: 26.7
;; Benchmark: 1.1us
;; Benchmark-Repeat: 1753
(do
(def template {:price 10.0 :volume 100 :msg "hi"})
(def my_ticks (create-series template))
(push-series my_ticks {:price 10.5 :volume 100 :msg "A"})
(push-series my_ticks {:price 11.2 :volume 200 :msg "B"})
(push-series my_ticks {:price 15.5 :volume 300 :msg "C"})
(def prices (.price my_ticks))
(+ (prices 0) (prices 1))
)