It gives me this error for my if structure:
if: expected a question and two answers, but found 4 parts
However i am doing it according to the syntax.
(if (or (null? list1) (null? list2))
display(result-list)
(begin
(append result-list (list((car list1) list2)))
(inner ((cdr list1) list2 result-list)))
)
Could you please tell me where am i doing it wrong?
The second line should be
(display result-list).The way you wrote it,
displayis the then-part of the if,(result-list)is the else-part and the begin-block is the superfluous fourth part that your compiler/interpreter complains about.