How to return a wave from a function?

How can I return a wave from a function?

I want to normalise some data in a 2D wave, and then assign that to a new wave so that I don't overwrite my existing data

I can see the wave "nd" in my data browser, but I can't figure out how to actually assign all of its values to the wave I want to.


function functionThatNormalises(data)
   //things to normalise data into a new wave called "nd"
   return nd //why can't I do this?
end

Make/O/N=(2814, 258) data
Make/O/N=(2814, 258) norm_data

// code in here that fills data with data from text files

norm_data = functionThatNormalises(data) //this doesn't work. How do I do this?

Thanks.

And here I was thinking the answer would be in the user-defined functions section on function syntax.