Click here to Skip to main content
15,890,973 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Lua
function BasicMath()
    function Add(a,b)
        function Subtract(a,b)
            function Mutiply(a,b)
                function Divide(a,b)
                    end
                end
            end
        end
    end



Hello i'm trying to return a nested function but i don't know how to does anyone know how to return a nested function? thanks for your Help :)

What I have tried:

I tried searching google and found no good results for returning a nested function
Posted
Updated 3-May-22 9:35am
Comments
CPallini 4-May-22 1:59am    
I didn't get you.
Could you please detail your scenario?
You know, the program requirements: what is the input and what is the expected output.

1 solution

Try the Lua documentation, or lua nested functions - Google Search[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900