Skip to content

Instantly share code, notes, and snippets.

@lauripiispanen
Created April 18, 2013 11:38
Show Gist options
  • Save lauripiispanen/5412081 to your computer and use it in GitHub Desktop.
Save lauripiispanen/5412081 to your computer and use it in GitHub Desktop.
Java y u no lambda? :(
public String getDays() {
String ret = "";
for (int i = 0; i < days.size(); i++) {
if (i > 0) {
ret += ", ";
}
ret += days.get(i);
}
return ret;
}
----
def getDays = days.join(", ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment