Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Project Euler - A Case Study In "Specification Driven Programming"

14 views
Skip to first unread message

Robert L.

unread,
Mar 12, 2018, 7:14:51 PM3/12/18
to
> Let's start with Project Euler Problem 1 : "If we list all the natural
> numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9.
> The sum of these multiples is 23. Find the sum of all the multiples of
> 3 or 5 below 1000."

(require srfi/42) ; sum-ec

(sum-ec (:range n 1 1000)
(if (zero? (* (modulo n 3) (modulo n 5))))
n)
===>
233168

--
Despite its proximity and high level of economic development, Israel has
refused to take any Syrian refugees. http://archive.org/details/nolies
0 new messages