genFizzBuzz <- function(n, ...)
{
  args <- list(...)
  
  
  factors <- as.integer(sapply(args, "[[", 1)) 
  words <- sapply(args, "[[", 2)
  sortedPermutation <- sort.list(factors)
  factors <- factors[sortedPermutation]
  words <- words[sortedPermutation]
  for(i in 1:n)
  {
    isFactor <- i %% factors == 0
    print(if(any(isFactor)) paste0(words[isFactor], collapse = "") else i)
  }
}
genFizzBuzz(105, c(3, "Fizz"), c(5, "Buzz"), c(7, "Baxx"))
genFizzBuzz(105, c(5, "Buzz"), c(9, "Prax"), c(3, "Fizz"), c(7, "Baxx"))