<commit_before>import type_utilities

def closure_trampoline(value):
    while type_utilities.is_nullary_closure(value):
        value = value()

    return value

def make_closure_trampoline_wrapper(handler):
    return lambda *args: handler(*[closure_trampoline(arg) for arg in args])

@make_closure_trampoline_wrapper
def pack_trampoline(value):
    while type_utilities.is_pack(value):
        value = closure_trampoline(value[0])

    return value<commit_msg>Issue #6: refactor the trampoline<commit_after>import type_utilities

def closure_trampoline(value):
    while type_utilities.is_nullary_closure(value):
        value = value()

    return value

def make_closure_trampoline_wrapper(handler):
    return lambda *args: handler(*list(map(closure_trampoline, args)))

def pack_trampoline(value):
    while type_utilities.is_pack(value):
        value = closure_trampoline(value[0])

    return value
{'fraction_non_alphanumeric': 0.0858085808580858, 'fraction_numerical': 0.0033003300330033004, 'mean_word_length': 5.190476190476191, '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': '5244356', 'n_tokens_mistral': 288, 'n_tokens_neox': 270, 'n_words': 57}