Search found 1 match
Search found 1 match • Page 1 of 1
- Sat Jan 06, 2018 11:47 pm
- Forum: Homework
- Topic: Solved- append a new atom upon finding specific atom
- Replies: 1
- Views: 4677
I've recently started working on LISP as part of my course. I am trying to add a new atom after every search atom in the list, my code is as below - (defun appendConst (OLD NEW L) (cond ((null L) ()) ((EQ (car L) OLD) (cons OLD (cons NEW (cdr L)))) (T (cons (car L) (appendConst OLD NEW (cdr L)))) ))...