Created
June 29, 2012 22:15
-
-
Save jamesc/3021004 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
not_found_cookbooks(AllVersions, Cookbooks) -> | |
case lists:filter(fun(CB) -> cookbook_exists(CB, AllVersions) end, Cookbooks) of | |
[] -> ok; | |
NotFound -> {not_found, [ cookbook_name(NFCookbook) || NFCookbook <- NotFound] } | |
end. | |
Can become : | |
not_found_cookbooks(AllVersions, Cookbooks) -> | |
NotFound = [ cookbook_name(Cookbook) || Cookbook <- Cookbooks, cookbook_exists(Cookbook, AllVersions)], | |
case NotFound | |
[] -> ok; | |
NotFound -> {not_found, NotFound} | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment