<commit_before>exports.program = function (program) {
  var update = program.update
  var view = program.view
  var done = program.done
  var state
  var isRunning = true

  function dispatch (message) {
    if (isRunning) {
      change(update(message, state))
    }
  }

  function change (change) {
    state = change[0]
    var effect = change[1]
    if (effect) {
      setTimeout(function () { effect(dispatch) }, 0)
    }
    view(state, dispatch)
  }

  change(program.init)

  return function kill () {
    if (!isRunning) {
      return
    }
    isRunning = false
    if (done) {
      done(state)
    }
  }
}<commit_msg>Remove setTimeout wrapper<commit_after>exports.program = function (program) {
  var update = program.update
  var view = program.view
  var done = program.done
  var state
  var isRunning = true

  function dispatch (message) {
    if (isRunning) {
      change(update(message, state))
    }
  }

  function change (change) {
    state = change[0]
    var effect = change[1]
    if (effect) {
      effect(dispatch)
    }
    view(state, dispatch)
  }

  change(program.init)

  return function kill () {
    if (!isRunning) {
      return
    }
    isRunning = false
    if (done) {
      done(state)
    }
  }
}
{'fraction_non_alphanumeric': 0.11325301204819277, 'fraction_numerical': 0.004016064257028112, 'mean_word_length': 2.423076923076923, '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': '3452960', 'n_tokens_mistral': 404, 'n_tokens_neox': 395, 'n_words': 102}