So I have an expression and I want to replace all occurrences of the function list by my-list, as follows.
Code: Select all
(defparameter *expr* '(let ((list (quote (1 2 3)))) ;; comment list
(append list (list 4 5 'list "list, 'list, LIST"))))
(do-replacement *expr*)
=>(LET ((LIST '(1 2 3)))
(APPEND LIST (MY-LIST 4 5 'LIST "list, 'list, LIST")))
but how do I check if the symbol list is used as a function in the expression?