Callers of functions like
Function/WAVE wrangleData(WAVE input)
// ...
return output
End
nearly always assume that the returned data is not the same wave ref as input. i.e. they are free to modify output without changing input.
If functions do something like that they need to document that.