o1-preview-2024-09-12· OpenAI WildChat-4.8M (AI2)
Your apply function is returning the spreadsheet function, but not actually applying it.…
- User
Your apply function is returning the spreadsheet function, but not actually applying it. Update apply to call the function. Pass in the result of calling toNumberList with args as an argument.
- Assistant
You're absolutely right—I should have called the function instead of returning it. Here's the updated
applyfunction that callsfnwith the result oftoNumberList(args)as its argument:def apply(fn, args): return fn(toNumberList(args))This change ensures that the
applyfunction executes the spreadsheet functionfnwith the appropriate list of numerical arguments.Let me know if you need any more help!