I'm supposed to create a function called ( merge-list lst1 lst2) that alternately picks elements from one of the two input lists and creates a new list. For example the output of (merge-list ‘(2 4) ‘(b c)) is '(2 b 4 c). Here's what I have so far, but when I compile I am receiving the "application:not a procedure" error
(define (merge-list lst1 lst2)
(cond ((null? lst1) lst2)
((null? lst2) lst1))
(append( append(list(car lst1) list(car lst2)))list-shuffle((cdr lst1)(cdr lst2))))
list-shuffle(lst1 lst2)
. The correct way (and do mind the parentheses!) is:(list-shuffle lst1 lst2)
. – Óscar López