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.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
(do
|
||||
(def stream (create-random-ohlc 42 200))
|
||||
|
||||
(macro prt [m] `(pipe (~m stream) (fn [s] (print ~m "=" s))))
|
||||
|
||||
(prt .open)
|
||||
(prt .high)
|
||||
(prt .low)
|
||||
(prt .close)
|
||||
)
|
||||
Reference in New Issue
Block a user