Skip to content

Instantly share code, notes, and snippets.

@dmalikov
Created March 17, 2013 09:04
Show Gist options
  • Save dmalikov/5180744 to your computer and use it in GitHub Desktop.
Save dmalikov/5180744 to your computer and use it in GitHub Desktop.
Clean and short
// es = map exists tasks
List<Boolean> es = Lists.transform(tasks, new Function<File, Boolean>() {
@Override
public Boolean apply(File file) {
return file.exists();
}
});
// es = foldl (&&) True $ map exists tasks
?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment