Page 1 of 1

solution Lips Complete this function in Lisp to replace all numbers in a list with a given code, including sublists. (DE

Posted: Mon May 09, 2022 7:13 am
by answerhappygod
solution Lips
Complete this function in Lisp to replace all numbers in a list
with a given code, including sublists. (DEFUN HideNumbers (L Code)
(COND ((NULL L) NIL) ; TBD -- Fill in this block ; Check for a
number, an atom, otherwise recurse ) ) ;;; ©2022 Steve O'Hara, UTSA
(PRINT (HideNumbers '(1 2 SHOE (3 4 DOOR)) 'X)) returns (X X SHOE
(X X DOOR)) (PRINT (HideNumbers '(((3)) (((ABC 5 6)))) 'X)) returns
(((X)) (((ABC X X))))