Skip to content
The Chat Archive
o1-preview-2024-09-12· OpenAI WildChat-4.8M (AI2)

Your apply function is returning the spreadsheet function, but not actually applying it.…

  1. 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.

  2. Assistant

    You're absolutely right—I should have called the function instead of returning it. Here's the updated apply function that calls fn with the result of toNumberList(args) as its argument:

    def apply(fn, args):
        return fn(toNumberList(args))
    

    This change ensures that the apply function executes the spreadsheet function fn with the appropriate list of numerical arguments.

    Let me know if you need any more help!