pkl
pkl copied to clipboard
For generators are eager in values, but should be lazy
x = new {
["one"] = 1
["two"] = this["one"] + 1
}
y = (x) {
for (k, v in x) {
[k] = v + 1
}
}
Here, y["two"]
should be 4, not 3.
for (v in x) {}
should iterate over lazy values, and for (k, v in x) {}
should iterate over eager keys and lazy values.