a triumph of style over substance
home archive projects about

Project Euler

Posted on 01 September 2018 | code

Project Euler Problem #1 is listing all natural numbers under 1000 and summing those divisible by 3 or 5. Kind of like a maths fizz buzz.


1..999 
|> Enum.filter(fn n -> rem(n, 3) == 0 or rem(n, 5) == 0 end) 
|> Enum.sum 
|> IO.puts

If you liked this post you can tweet it or follow me on Twitter!

Related Posts

  • Build Monitor on Raspberry Pi
  • Occasionally...
  • Tracing Failed IIS Requests
Hosted by GitHub Powered by Jekyll | bulma | lunr search | prism syntax highlighting | Font Awesome