<commit_before>import { _instance_method, _instance, _extend } from './utils.js'
import { curry, concat } from 'lodash/fp'

let empty = type => _instance_method(Alternative, 'empty', type)
let f1 = curry((a, b) => _instance_method(Alternative, '<|>', a)(a,b))
let Alternative = {
  // The identity of '<|>'
  empty

  // An associative binary operation
  // f a -> f a -> f a
  ,'<|>': f1
  ,_methods: {
    '<|>': function(other) {
      return Alternative['<|>'](this, other)
    }
  }
  ,_static_methods: {
    empty: function() {
      return Alternative['empty'](this)
    }
  }
}

_instance(Alternative, Array).where({
  empty: [],
  '<|>': concat
})

_extend(Array.prototype, Alternative._methods)
_extend(Array, Alternative._static_methods)

module.exports = Alternative
<commit_msg>format<commit_after>import {
  _instance_method,
  _instance,
  _extend
} from './utils.js'
import {
  curry,
  concat
} from 'lodash/fp'

let empty = type => _instance_method(Alternative, 'empty', type)
let f1 = curry((a, b) => _instance_method(Alternative, '<|>', a)(a, b))
let Alternative = {
  // The identity of '<|>'
  empty,

  // An associative binary operation
  // f a -> f a -> f a
  '<|>': f1,
  _methods: {
    '<|>': function(other) {
      return Alternative['<|>'](this, other)
    }
  },
  _static_methods: {
    empty: function() {
      return Alternative['empty'](this)
    }
  }
}

_instance(Alternative, Array)
  .where({
    empty: [],
    '<|>': concat
  })

_extend(Array.prototype, Alternative._methods)
_extend(Array, Alternative._static_methods)

module.exports = Alternative

{'fraction_non_alphanumeric': 0.1755485893416928, 'fraction_numerical': 0.0025078369905956114, 'mean_word_length': 3.5730659025787967, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 23, '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': '3348859', 'n_tokens_mistral': 579, 'n_tokens_neox': 544, 'n_words': 122}