(defn foo
[first] ;let's say first = '(I am a taco)
(concat '(wierd) first) ;I want to concat or add the word 'wierd to the words: I am a taco
)
我注意到,在进行连接时,我遇到了错误消息。我也尝试过cons函数,但这似乎没有做任何事情。我的问题是,您可以使用函数参数进行连接吗?如果是这样,建议对上述代码进行什么修复?
(defn foo [first]
(concat '("wierd") first))
(foo '("I" "am" "a" "taco"))