Well, I am trying to use an element of function list.But i am having problem to use it in my code.
(func (list sum) (list 1 2 3)) i am trying to apply sum element in the list1 to my list2 . sum is described as taking list as argument. I just took one function in list1 for try. However
(display (car list1)) --> sum
(display list2)--->(1 2 3)
(display (list (sum list2)))--->(6)
(display ((car list1) list2))---> ERROR
ERROR:function call: expected a function after the open parenthesis, but received ‘sum
I can’t understand why it does give this error. As you see (car list1) refers to sum and list2 refers to (1 2 3) llpist.
Can you tell me if i got anything wrong? Thx.
We need to see the implementation of
sumand the exact way you’re creating the lists, I’m guessing that you’re passing the symbol'sumand not the proceduresum. When I try the following it works without the problem you’re reporting: