Skip to content

builtins: add lst xs i v for list update by index#177

Merged
danieljohnmorris merged 2 commits into
mainfrom
fix/list-mutation
May 12, 2026
Merged

builtins: add lst xs i v for list update by index#177
danieljohnmorris merged 2 commits into
mainfrom
fix/list-mutation

Conversation

@danieljohnmorris
Copy link
Copy Markdown
Collaborator

Doc cited histogram-bin updates requiring full list rebuild per increment, O(n²) for big histograms. Added lst xs:L a i:n v:a>L a returning a new list with index i replaced. Value semantics preserved. Negative/non-int index errors like at. Opcode 110. 23 cross-engine tests + histogram example.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

❌ Patch coverage is 94.35737% with 18 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/interpreter/mod.rs 86.95% 9 Missing ⚠️
src/vm/mod.rs 95.39% 7 Missing ⚠️
src/verify.rs 97.40% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Doc cited histogram-bin updates requiring full list rebuild per increment, O(n^2) for big histograms. Added lst xs:L a i:n v:a>L a returning a new list with element at index i replaced. Value semantics preserved - original list unchanged. Negative index errors like at. Opcode 110.
@danieljohnmorris danieljohnmorris merged commit b4e8f7b into main May 12, 2026
4 checks passed
@danieljohnmorris danieljohnmorris deleted the fix/list-mutation branch May 12, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant