Simplify tuple flattening and destructuring

The `flatten_tuple` function was unnecessarily recursive. It can now
simply return the elements of the tuple directly. The VM's destructuring
logic has been updated to handle nested destructuring more efficiently.
A new integration test case for multi-level destructuring has been
added.
This commit is contained in:
Michael Schimmel
2026-02-24 10:10:47 +01:00
parent 6810d5fa9f
commit 683d0f4dbe
5 changed files with 45 additions and 10 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
;; Benchmark: 969ns
;; Benchmark-Repeat: 2078
;; Benchmark: 969ns
;; Benchmark-Repeat: 2078
;; Comprehensive Destructuring Test
;; Covers: Nested tuples, mixed params, dynamic passing