I’m pretty sure this solution is something very simple, but hard to find…
So if I
=> (def x '(1 (dec 3) 3))
;user/x
How can I evaluate the expression so that
=> (***insert function here** x)
;(1 2 3)
So far, with unquote I’ve gotten (1 (dec 3) 3), which is x without the quote, not what I want. And I’ve looked into `~x which returns the same result. Is there some combination of ~ @ and ` that returns the evaluated function? (I’m throwing around functions here, these are not restrictions)
Please try not to change my original definition of x, if possible.
Ok, suppose for this question, the expression was '(list 1 (dec 3) 3)
Now how do I retrieve
=> (***insert function here** x)
;(1 2 3)
Yes, now eval works. Thanks for adding that important piece of input.
This can be accomplished by mapping
evalover the list of sequences.since
(1 2 3)is not a proper function call we can fix that and then use eval, which would then handle arbitrarily nested functions.