['cat', 'dog', 'fish'].collect { it.length() }
it
is the default name of the parameter if you have a single parameter and do not explicitly name the parameter. You can optionally declare the parameter as well.
['cat', 'dog', 'fish'].collect { animal -> animal.length() }