const analogous = require('./distribution-functions/analogous');
const complement = require('./distribution-functions/complement');
const equidistant = require('./distribution-functions/equidistant');
const geometricProgression = require('./distribution-functions/geometric-progression');
const rotate = require('./distribution-functions/rotate');

function generateDistribution(config){'use strict';
  let fn;
  switch(config.type){
    case 'analogous': fn = analogous;
    break;
    case 'complement': fn = complement;
    break;
    case 'equidistant': fn = equidistant;
    break;
    case 'geometric-progression': fn = geometricProgression;
    break;
    case 'rotate': fn = rotate;
    break;
    default: fn = equidistant;
  }
  return fn(config.count, config.options);
}

module.exports = generateDistribution;

@@ -402,16 +402,182 @@
   let fn
+,%0A      defaults = %7B%0A        type: 'rotate',%0A        count: 1,%0A        options: %7B%7D%0A      %7D;%0A      %0A  config = config %7C%7C %7B%7D;%0A  config = Object.assign(defaults, config)
 ;%0A  swit

add default values