I have a function foo-function that takes the variable x and performs a specific action. The variable x comes before the definition of foo-function:
(defvar x "value1")
(defun foo-function ()
(blabalabla x))
I would like to define a new function foo-function2 which takes several variables value1, value2, value3, .... of x (the number of variables is indeterminate) and runs the function foo-function for these variables, i.e., the following action:
(foo-function2 "value1" "value2" "value3", ...)
It should result in the execution of foo-function for the values value1, value2, value3, .... of x.
How do I define this function?