0 of 464 solved

Partial Function Application

Write a function `partial(f, *args)` that returns a new function with the given positional arguments pre-filled.

When the returned function is called, it should append any new arguments after the stored ones.

#### Example
Input: `partial(add, 1, 2)(3)`
Output: `6`
def partial(f, *args):
    """
    Returns a new function that is f partially applied to the arguments.

    Args:
    f: The function to partially apply.
    *args: The arguments to partially apply.

    Returns:
    function: The new function that is f partially applied to the arguments.
    """
    # TODO: Implement the partial function
    pass