[Feature] Nested Destructuring
Opened this issue · 1 comments
JustusAdam commented
Extend the ALang creation int the adapter to support nested destructuring in lets and algos.
(defalgo myalgo [input [destructured-input]]
(let [[a [b c]] (some/sfn)]
...)
This should be transformed into
(defalgo myalgo [input input_0]
(let [[destructured-input] (ohua.lang/id input_0)
[a b_0] (some/sfn)
[b c] (ohua.lang/id b_0)]
...)
JustusAdam commented
It turns out at least for algos this does currently work up to one nesting level.
Aka
(algo [ [x y] z] ...)
Becomes
Lambda ["x", "y"] $ Lambda "z" ...
But we also want this for let
s and deeper nesting levels