Files
RustAst/examples/sma.myc
T
Michael Schimmel f88992da61 Add Stream support for field accessors
The type checker now correctly handles unwrapping `Stream(T)` types for
lambda arguments.
A new `build_map_stream` function has been added to `rtl/streams.rs` to
facilitate field access on streams.
The `create-random-ohlc` function now returns a `Stream` instead of a
`Series`.
Examples have been updated to reflect these changes and demonstrate
stream usage.
2026-03-07 20:47:05 +01:00

11 lines
207 B
Plaintext

#use rtl
(do
(def src (create-random-ohlc 42 200))
(macro printx [s] `(fn [x] (print ~s x)))
(pipe [(.close src)] (printx "close="))
(pipe [(pipe [(.close src)] (SMA 20))] (printx "sma="))
)