Search found 1 match

by prashu421
Sat Jan 06, 2018 11:47 pm
Forum: Homework
Topic: Solved- append a new atom upon finding specific atom
Replies: 1
Views: 3794

Solved- append a new atom upon finding specific atom

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)))) ))...