Stuff
public text v1 · immutable1) ...
def getNames(authors){
def Names = new ArrayList();
authors.each {author -> Names.add(author.name)};
return Names;
}
println(getNames(authors));
2)...
authors.each {author -> println author.name};1) ...
def getNames(authors){
def Names = new ArrayList();
authors.each {author -> Names.add(author.name)};
return Names;
}
println(getNames(authors));
2)...
authors.each {author -> println author.name};