remove with deep recursion in lisp -


How can I apply the deletion function with a deep recycling?

I know that shallow recursive, but it is difficult to turn it into a deep revision.

  (Merrywave '(1 2)' (1 ((2) 3) (4 (5 ((1 2) 5))))) - & gt; (1 (3) (4 (5 (5)))    

I think By "deep recurring" you are referring to a recursion on a tree instead of a recursive list?

The more low-level answer is between the car and the CRD, just the CDR Instead, though I prefer to use higher order functions, in this case, MapperCar is repeatedly called:

  (Diffun Myevarave (item) () (Aum Tree) tree (Mupparkar (Lamborghite (sub-section) (Myremove item subtree) (Remove item tree: test # 'equivalent)))   

Edit: Here The low-level solution is:

  (defun maryrovemove (tree of the tree) (code tree) ((equivalent tree of tree) (marrow item (cdr tree)) ( 'Otherwise (Opposition (MyWarm Item (Car Tree)) (MyWarm Item (CDR Trees)))))    

Comments