<commit_before>import R from 'ramda';

const MaybeProto = {
  map: R.curry(function(fn) {
    if (!R.isNil(this.value)) { return Maybe(fn(this.value)); }

    return this;
  })
};

const Maybe = function(c) {
  const newMaybe = Object.create(MaybeProto);
  newMaybe.value = c;
  return newMaybe;
};

export default {};
export {Maybe};<commit_msg>refactored Maybe to have an explicit Nothing<commit_after>import R from 'ramda';

const MaybeProto = {
  map: R.curry(function(fn) {
    return Maybe(fn(this.value));
  })
};

const Nothing = {};
Nothing.map = R.always(Nothing);

const Maybe = function(c) {
  if (R.isNil(c)) { return Nothing; }

  const newMaybe = Object.create(MaybeProto);
  newMaybe.value = c;
  return newMaybe;
};

export default {};
export {Maybe};
{'fraction_non_alphanumeric': 0.15364583333333334, 'fraction_numerical': 0.0, 'mean_word_length': 4.126666666666667, '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': '6669552', 'n_tokens_mistral': 266, 'n_tokens_neox': 263, 'n_words': 65}