Is there a form in any lisp that could “spread” a list in the parent sexp? Like:
(+ (spread '(1 2 3))) -> (+ 1 2 3)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are two way to do it. Which is better depends on what you want in the end.
Generally, you can use
,@inside`(backquote). The form following,@is evaluated to produce a list, which is then spliced into the template:Or, if you just want to call a function with its arguments which are packed in a list, it will be more convenient to use the
applyfunction: