I am currently splitting up our build pipeline into reusable global methods and am asking myself the same questions.
I played around with the standardBuild example to implement a build skeleton for our build pipelines:
But more and more I come to the conclusion, that I will avoid using the closure technique and just implement a global function with proper arguments.
Maybe there should be some guidelines (and maybe a real world example) added to the best practises when to use which technique.
Regards and a happy new year,
Daniel