robpike / ivy

ivy, an APL-like calculator
Other
1.32k stars 103 forks source link

ivy: fix buggy interaction between take and comma #67

Closed rsc closed 2 years ago

rsc commented 2 years ago
x = 1 2 3 4 5
(2 take x), 6 7
x

Because (2 take x) slices x and comma appends, this was overwriting x to be 1 2 6 7 5.

Fix twice, by making both take and comma trim capacity.

robpike commented 2 years ago

Tagged as v0.1.5