Syntax for pipeline code in function?

Thank you for this great explanation - exactly what I needed to know.