Thanks Michael - appreciated.
I couldn't work out why my solution failed though
With my code
(defun vl-remove-1st (x l / foo)
(defun foo (y)
(if (equal x y)
(defun foo (y) nil)))
(vl-remove-if (function foo) l))
For say,
(vl-remove-1st 1 '(1 2 3 1 2 3))
I would have thought the first item is fed to foo, the IF statement evaluates and redefines foo (hence returning T, and so the first item is removed), and subsequent evaluation of foo would return nil (hence no more items are removed).
What is wrong in my reasoning?