Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/lisa-rules-aux-fn.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -219,19 +219,6 @@
(reverse result))))


(defun find-unused-parameters (definition-form)
"Finds parameters in a function definition that are declared but not used."
(let* ((params (get-parameters-list definition-form))
(body (get-body-forms definition-form))
(used-symbols (find-used-symbols body))
(unused-params nil))
(dolist (param params)
(when (and (symbolp param)
(not (gethash param used-symbols)))
(push param unused-params)))
(reverse unused-params)))


(defun find-used-symbols (form)
"Recursively traverses a form to find and count all symbols used."
(let ((used-symbols (make-hash-table :test 'eq)))
Expand Down