CertainLach / jrsonnet

Rust implementation of Jsonnet language
MIT License
290 stars 33 forks source link

fix: lazy object comprehension #145

Closed CertainLach closed 5 months ago

CertainLach commented 5 months ago

Array comprehension should be able to depend on its own result, and it is able in go-jsonnet/cpp-jsonnet.

Has minimal impact on the performance in the most cases.

Discovered while implementing day 4 of advent of code 2023. https://github.com/CertainLach/AOC-2023/blob/2ab792288ecfd558473efe2fb3c1eca19f574814/day4.jsonnet#L23