Implement function composition (compose) with variadic first function

Implement a Python function compose(*funcs) that composes functions in the given order:

  • compose takes one or more functions and returns a new function f.
  • When calling f(*args), pass all `...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: