The code given in the book,
吾有一列。名之曰「甲」。充「甲」以三。充「甲」以五。
吾有一列。名之曰「乙」。
凡「甲」中之「元」。充「乙」以其也。
compiles to
var 甲 = [];
甲.push(3);
甲.push(5);
var 乙 = [];
for (let 元 of 甲) {
乙.push();
};
in both the online IDE and wenyan -c.
Contrary to what is claimed in the book (欲令其實亦二。互不相干。當如何。曰。當如是), this code does not make a copy of an array, since no element is pushed to 「乙」. Though
吾有一列。名之曰「甲」。充「甲」以三。充「甲」以五。
吾有一列。名之曰「乙」。
凡「甲」中之「元」。充「乙」以「元」也。
would fix the problem, it might be that the failure of 其 to point to 「元」 is a regression introduced somewhere within the long history of wenyan-lang.
The code given in the book,
compiles to
in both the online IDE and
wenyan -c.Contrary to what is claimed in the book (欲令其實亦二。互不相干。當如何。曰。當如是), this code does not make a copy of an array, since no element is pushed to 「乙」. Though
would fix the problem, it might be that the failure of 其 to point to 「元」 is a regression introduced somewhere within the long history of wenyan-lang.