<commit_before>#! /usr/bin/env python
"""
*****************
Useful Decorators
*****************
"""

import sys
import types
import inspect
import functools
import itertools
import collections

from decorator import decorator
from automath import automath,right
from copyable import copyable
from inplace import inplace

def curry(fun,*args):
    """
    >>> @curry
    ... def F(a,b,c):
    ...     return a+b+c
    >>> F(1)(2)(3)
    6
    >>> F(4,5)(6)
    15
    >>> F(7)(8,9)
    24
    >>> F(10,11,12)<commit_msg>stopped using the automath decorator form<commit_after>#! /usr/bin/env python
"""
*****************
Useful Decorators
*****************
"""

import sys
import types
import inspect
import functools
import itertools
import collections

from decorator import decorator
from automath import Automath,Right
from copyable import Copyable

def curry(fun,*args):
    """
    >>> @curry
    ... def F(a,b,c):
    ...     return a+b+c
    >>> F(1)(2)(3)
    6
    >>> F(4,5)(6)
    15
    >>> F(7)(8,9)
    24
    >>> F(10,11,12)
{'fraction_non_alphanumeric': 0.20423892100192678, 'fraction_numerical': 0.038535645472061654, 'mean_word_length': 3.365546218487395, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, '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': '2849711', 'n_tokens_mistral': 372, 'n_tokens_neox': 360, 'n_words': 94}