<commit_before>// converts notes to midi numbers
var note_to_midi_mapper = require('./note_mapping.js').note_to_midi_mapper;

// computes durations of mus expression segments
var end_time = function(init_time, expr) {
  var left, right;
  switch (expr.tag) {
    case 'note': // base case
      return init_time + expr.dur;
    case 'rest': // another base case
      return init_time + expr.dur;
    case 'seq': // seq case
      return end_time(end_time(init_time, expr.left), expr.right);
    case 'par': // par case
      left = end_time(init_time, expr.left);
      right = end_time(init_time, expr.right);
      return Math.max.apply(null, [left, right]);
    case 'repeat': // segment repetion
      return init_time + expr.count * end_time(0, expr.section);
  }
};<commit_msg>changed unnecessarily verbose code<commit_after>// converts notes to midi numbers
var note_to_midi_mapper = require('./note_mapping.js').note_to_midi_mapper;

// computes durations of mus expression segments
var end_time = function(init_time, expr) {
  var left, right;
  switch (expr.tag) {
    case 'note': // base case
      return init_time + expr.dur;
    case 'rest': // another base case
      return init_time + expr.dur;
    case 'seq': // seq case
      return end_time(end_time(init_time, expr.left), expr.right);
    case 'par': // par case
      left = end_time(init_time, expr.left);
      right = end_time(init_time, expr.right);
      return Math.max.(left, right);
    case 'repeat': // segment repetion
      return init_time + expr.count * end_time(0, expr.section);
  }
};
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.0012690355329949238, 'mean_word_length': 3.227882037533512, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2857790', 'n_tokens_mistral': 514, 'n_tokens_neox': 506, 'n_words': 142}