code: function transformClassicStochasticProductions(productions) {
  
    return function transformedProduction() {
      let resultList = productions; // the parser for productions shall create this list
      let count = resultList.length;
  
      let r = Math.random();
      for (let i = 0; i < count; i++) {
        let range = (i + 1) / count;
        if (r <= range) return resultList[i];
      }
  
      console.error('Should have returned a result of the list, something is wrong here with the random numbers?.');
    };
  }
docs: These transformers get a classic ABOP snytax as input and return a standardized production object in the form of ['F', { successor:String/Iterable [alternatively]stochasticSuccessors: Iterable of standardized objects with mandatory weight fields, leftCtx: iterable/string, rightCtx: Iterable/String, condition: Function }]