Created
April 27, 2015 20:44
-
-
Save Linell/5ebe42acf9fe96f5e5b4 to your computer and use it in GitHub Desktop.
Project Euler problem on in Elixir.
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
# The fancy anonymous function syntax. I'm kind of not a fan of it in this case. | |
divisible? = &(rem(&1, 5) == 0 || rem(&1, 3) == 0) | |
1..999 |> Enum.filter(divisible?) |> Enum.sum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment