<commit_before>/**
 * Return an array with the separator interspersed between
 * each element of the input array.
 *
 * @memberof array
 *
 * @param {Array<*>} array - Array to intersperse.
 * @param {*} separator - Value to insert.
 *
 * @returns {Array}
 */
export function intersperse(array, separator) {
  if (array.length === 0) {
    return [];
  }

  return array
    .slice(1)
    .reduce((acc, val) => acc.concat([separator, val]), [array[0]]);
}<commit_msg>Adds example comment for array/intersperse.<commit_after>/**
 * Return an array with the separator interspersed between
 * each element of the input array.
 *
 * @memberof array
 *
 * @param {Array<*>} array - Array to intersperse.
 * @param {*} separator - Value to insert.
 *
 * @returns {Array}
 *
 * @example
 * intersperse(["a", "b", "c"], "x"); // => ["a", "x", "b", "x", "c"]
 */
export function intersperse(array, separator) {
  if (array.length === 0) {
    return [];
  }

  return array
    .slice(1)
    .reduce((acc, val) => acc.concat([separator, val]), [array[0]]);
}
{'fraction_non_alphanumeric': 0.18303145853193517, 'fraction_numerical': 0.005719733079122974, 'mean_word_length': 3.430379746835443, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '7116329', 'n_tokens_mistral': 364, 'n_tokens_neox': 344, 'n_words': 106}