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)
    33
    """
    def curried(*moreArgs):
        A=args+moreArgs
        if len(A)<fun.func_code.co_argcount:
            return curry(fun,*A)
        else:
            return fun(*A)
    return curried