Create a decorator that fixes the first positional argument of a function.
Constraints
Example
>>> @bind_first_arg(1) ... def add(a, b): ... return a + b >>> add(2) 3 >>> @bind_first_arg(10) ... def multiply(a, b, c): ... return a * b * c >>> multiply(2, 3) 60 >>> power = bind_first_arg(2)(pow) >>> power(3) 8
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints