In programming languages, it is often possible to define a function that takes a "list" of real numbers as an argument.
Is there also in math a theory of functions that take an arbitrary number of arguments? For example a function that takes an arbitrary number of natural numbers as a arguments, and calculates their product.
You can model a function with arbitrary arguments by defining a set of arbitrary tupples. Which can be done recursively $$ A^0 = \emptyset $$ $$ A^1 = A $$ $$ A^n = A \times A^{n-1} $$ $$ A^* = \bigcup_{n \in \mathbb{N}} A^n $$
Then you define functions $f : A^* \to B$ this will allow you to model an arbitrary aririty function.