Making the functions take varargs, and passing that to some concat() function, may be a simple solution.