The function filter is declared with 2 parameters filter(?head $?tail)
but you are calling it with only one (filter $?tail)
Is the recursion needed? This problem can be solved easily with the function delete-member$
:
(delete-member$ $?list 0)
Example:
CLIPS> (delete-member$ (create$ 6 7 0 8 0 7) 0)
(6 7 8 7)
CLIPS>