Hi guys I am trying to concat a list and to return the first value with extra brackets for example when I call the function (bracket-head '(a b c)) => ( (A) B C ).
I have done it to give the result when I call the function with '('(a) b c). So here is my code:
(defun bracket-head (list)
(append (first list) (rest list))
First of all,
()are parentheses, not brackets.Next, “extra parentheses” means you wrap the object in a list:
Thus, what you need to do is
Or, if you do not want to modify the list in-place: