Hi, I'm Jess. I use Python to craft web apps and sift data. I'm honing my full-stack development chops on Author Alcove.
I found a few other sites out there that are writing about Scala and Project Euler:
Dianne Marsh’s Blog
Nice. Thanks. :) Pak Tam
How does this filter out the multiples of 15? Does FoldLeft remove duplicates?
(1 until 1000).filter(n => n % 3 == 0 || n % 5 == 0).foldLeft(0)(_ + _)
@Jim H In that case we don’t need to subtract the multiples of 15 because they aren’t counted twice like they were in the first example. When foldLeft operates on the range, there is only one instance of 15 in the range.
Scala seems like messy Python. I probably need to look into it more though
Notify me of follow-up comments by email.
Notify me of new posts by email.
Browse the article archives.
You can have new articles delivered to your inbox.
© 2007-2015 GrokCode