concept parameter in category gradle

This is an excerpt from Manning's book Gradle in Action - corrected 9052019.
Many times, you’ll find yourself wanting to define common behavior for all your projects or only the subprojects of your build. For each of these use cases, the Project API provides a specialized method: allprojects and subprojects. Let’s say you want to apply the Java plugin to all of your subprojects because you need to compile Java source code. You can do so by defining the code within the subprojects closure parameter.
A closure is a block of code of type groovy.lang.Closure, similar to lambdas in other programming languages. Closures can be assigned to variables, passed to methods as parameters, and called like regular methods.
Instead of using the implicit closure parameter, you can be more descriptive by assigning your own parameter name. In the next listing, you define a parameter named version of type ProjectVersion.
Keep in mind that typing is optional in Groovy. You could have used the identifier version without the type. Groovy doesn’t limit the number of parameters a closure can define. The following listing shows how to declare multiple, untyped parameters for a closure.