Created
July 1, 2015 22:47
-
-
Save ferd/a0e616b5ad5862f470ff 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
dedup_test_mods(Mods) -> | |
extract_dedups([{expand_mod(atom_to_list(Mod)), Mod} || Mod <- Mods]). | |
expand_mod(ModStr) -> | |
case lists:suffix("_test", ModStr) of | |
true -> ModStr; | |
false -> ModStr ++ "_test" | |
end. | |
extract_dedups(Mods) -> | |
[Mod || {_, Mod} <- lists:ukeysort(Mods)]. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment