You can only use built in Lisp functions and you cannot use setq function.
Write a function f2 that decides whether a list has an atom inside. Example: (f2 ‘((a b)(c d))) returns nil, (f2 ‘(a (b c))) returns t
please please thumbs up!!
hope it will help uh out!!!
Code::
(IN LISP LANGUAGE)
-------------------------------------------
(defun f2 (ls)
(cond ((null ls) nil)
((atom (car ls)) t)
((= 0 0) (f2 (cdr ls)))))
(write (f2 '((a b) (b c))))
----------------------------------------
output::
Get Answers For Free
Most questions answered within 1 hours.