<commit_before>import isFunction from './isFunction';

export default function (...args) {
  let result = [];
  for (let i = 0; i < args.length; i += 1) {
    const arg = args[i];
    if (isFunction(arg)) result.push(arg);
    else if (Array.isArray(arg)) result = result.concat(arg.filter(isFunction));
  }
  return result.length === 0 ? undefined : result;
}<commit_msg>Shorter extractFunctions<commit_after>import isFunction from './isFunction';

const concat = Array.prototype.concat;
export default function () {
  const fns = concat.apply([], arguments).filter(isFunction);
  return fns.length === 0 ? undefined : fns;
}
{'fraction_non_alphanumeric': 0.15335463258785942, 'fraction_numerical': 0.006389776357827476, 'mean_word_length': 4.26890756302521, 'pattern_counts': {'":': 0, '<': 4, '<?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': '5362270', 'n_tokens_mistral': 197, 'n_tokens_neox': 192, 'n_words': 54}