Always declare the parameter types and return types for functions/methods.
Do this:
Groovy
BigDecimal getCost(BigDecimal number) {
// ...
}
Avoid this:
Groovy
def round(number) {
// ...
}
Declaring the types explicitly not only provides type safety, but also allows the types to serve as a form of documentation, which makes the code easier to read and understand and makes it more re-usable by other team members.