When you first create a WayScript program, you will see one function, called "Main." By default, the Main function is the starting point for your WayScript program.
You cannot delete the Main function, but you can rename it, or define inputs/outputs.
To create a new function, click the + icon to the right of the function header. A new function tree will appear to the right of the previous function.
To delete a function, hover over the header and click the x icon to the left of the function name.
Once you have created a function, you can:
Edit the function definition (change its name or define inputs and outputs)
Call the function from elsewhere in your WayScript program
Return values from the function