I need help on lisp
Create a recursivefunction ALTERNATE that takes an item and a list asparameters. It will return a list with the input item before eachitem in the list. Do error checking on the input.
[26]> (alternate 8 ‘(a b c))
(8 a 8 b 8 c)
[28]> (alternate 8 “foo”)
Error in ALTERNATE function. Second parameter must be a list,but was “foo”.
NIL
[30]> (alternate ‘(a b c) ‘(1 2 (3 5) 7 9))
((a b c) 1 (a b c) 2 (a b c) (3 5) (a b c) 7 (a b c) 9)
Expert Answer
An answer will be send
PayPal Gateway not configured
PayPal Gateway not configured