I've seen so many people do the "select function body, copy, toggle comment, paste copy of function, try out ideas on this new version" workflow. I've done it plenty too in Matlab and similar during various labs at school. I'm not talking about best practice during software engineering, I'm talking about having the confidence your code can easily get back to a known good state if you want to experiment, like beginners should do a lot of.
And plenty of times functions are self contained enough that you can change the function body without changing other code as well.
And plenty of times functions are self contained enough that you can change the function body without changing other code as well.