Problem scenario
You want to call a function and have it return a value. How do you do this?
Solution
Overview
(If you need assistance installing Groovy, see this posting for CentOS. or see this posting for Debian/Ubuntu Linux.)
Groovy has something called “Closures.” These act like functions in other programming languages.
…