<commit_before>Nali.extend Deferred:

  new: ( callback ) ->
    obj         = Object.create @
    obj.defer   = callback
    obj.awaits  = []
    obj.results = []
    obj

  await: ( callback ) ->
    wrapper = ( args... ) =>
      @results.push callback args...
      @awaits.splice @awaits.indexOf( wrapper ), 1
      @defer @results unless @awaits.length
    @awaits.push wrapper
    wrapper<commit_msg>comment deferred<commit_after>#Nali.extend Deferred:
#
#  new: ( callback ) ->
#    obj         = Object.create @
#    obj.defer   = callback
#    obj.awaits  = []
#    obj.results = []
#    obj
#
#  await: ( callback ) ->
#    wrapper = ( args... ) =>
#      @results.push callback args...
#      @awaits.splice @awaits.indexOf( wrapper ), 1
#      @defer @results unless @awaits.length
#    @awaits.push wrapper
#    wrapper
{'fraction_non_alphanumeric': 0.148859543817527, 'fraction_numerical': 0.0024009603841536613, 'mean_word_length': 2.159090909090909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4546607', 'n_tokens_mistral': 275, 'n_tokens_neox': 271, 'n_words': 58}