Last active
September 6, 2015 15:34
-
-
Save CyrusOfEden/6c5772fd197e5b76fc04 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
def delete_all(collection, value) when is_list(collection) do | |
List.foldr collection, [], fn | |
x, acc when x == value -> | |
acc | |
x, acc -> | |
[x|acc] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yup, that does it. Thanks! I'll update the original post with the this in the coming days!