<commit_before>var statePending = 0,
    stateFulfilled = 1,
    stateRejected = 2;

var IO = module.exports = function (a) {
  this.state = statePending;
  this.action = a;
  this.value = null;
  this.reason = null;
  this.onFulfilled = IO.resolved;
  this.onRejected = IO.rejected;
};

IO.resolved = function (value) {
  var io = new IO();
  io.state = stateFulfilled;
  io.value = value;
  return io;
};

IO.rejected = function (reason) {
  var io = new IO();
  io.state = stateRejected;
  io.reason = reason;
  return io;
};

IO.try = function (f) {
  try {
    var v = f();
    if (!(v instanceof IO)) {
      return IO.resolved(v);
    }
    return v;
  } catch (e) {
    return IO.rejected(e);
  }
};

IO.method = function (f) {
  return function () {
    try {
      return IO.resolved(f.apply(this, arguments));
    } catch (e) {
      return IO.rejected(e);
    }
  };<commit_msg>let .method use .try<commit_after>var statePending = 0,
    stateFulfilled = 1,
    stateRejected = 2;

var IO = module.exports = function (a) {
  this.state = statePending;
  this.action = a;
  this.value = null;
  this.reason = null;
  this.onFulfilled = IO.resolved;
  this.onRejected = IO.rejected;
};

IO.resolved = function (value) {
  var io = new IO();
  io.state = stateFulfilled;
  io.value = value;
  return io;
};

IO.rejected = function (reason) {
  var io = new IO();
  io.state = stateRejected;
  io.reason = reason;
  return io;
};

IO.try = function (f) {
  try {
    var v = f();
    if (!(v instanceof IO)) {
      return IO.resolved(v);
    }
    return v;
  } catch (e) {
    return IO.rejected(e);
  }
};

IO.method = function (f) {
  return function () {
    var c = this, a = arguments;
    return IO.try(function () {
      return f.apply(c, a);
    });
  };
{'fraction_non_alphanumeric': 0.15172024816694868, 'fraction_numerical': 0.00338409475465313, 'mean_word_length': 2.5622489959839356, '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': '7329339', 'n_tokens_mistral': 667, 'n_tokens_neox': 658, 'n_words': 169}