i'm writing some scala code to emulate a python decorator. i'm considering implementing this by having the decorator extend a Function trait. the issue is that i want this decorator to extend a Function that accepts any number of arguments, and the only Function traits i can find only allow a specific number of arguments, e.g. Function1, Function2, etc.
does such a trait exist? alternatively, is there a better way to implement such a decorator?
Edit: I recast this question to be more clear at scala: memoize a function no matter how many arguments the function takes?.