Javascript Generator

Write a generator sequence_gen ( sequenceGen in JavaScript) that, given the first terms of a sequence will generate a (potentially) infinite amount of terms, where each subsequent term is the sum of the previous x terms where x is the amount of initial arguments (examples of such sequences are the Fibonacci, Tribonacci and Lucas number sequences).

Test: http://jsfiddle.net/vqrhtr8d/1/

function* sequenceGen(){
  var list = [].slice.call(arguments);
  var sum = 0;
  for(var i = 0; i < arguments.length; i++) {
    yield arguments[i];
    sum+=arguments[i];
  }
  while(true) {
    yield sum;
    list.push(sum);
    sum+=sum-list.shift(0);
  }
}

var fib = sequenceGen(0, 1)
for(var i = 0; i < 10; i++) {
  console.log(fib.next().value)
}

var fib = sequenceGen(0, 1, 1)
for(var i = 0; i < 10; i++) {
  console.log(fib.next().value)
}