Of course! Just because it’s a function doesn’t mean it halts the running of everything else.
The block inside the function. This is where all the work that change the inputs to the outputs happens. It’s what’s necessary for the function to work.
(To be honest, this is the first time someone has critically analysed my code, and it’s fun to see where one can improve and learn from his own mistakes. Thanks very much for that, ionatan.)