Multiples
So, I have finally written something that actually works. Finding the multiples of 3 and 5, even though it does so very slowly. Anyway, here goes!
(defun multiple (k &optional (lim 10) (n 1) (sum 0))     "Find the multiples of k up to limit lim."     (if (>= (* k n) lim)         sum         (multiple k lim (+ n 1) (+ sum (* k n)))))
For finding the sum of multiples for 3 and 5, I call that function as follows:
(- (+ (multiple 3) (multiple 5)) (multiple 15))
Status: Working on something faster, and more efficient.
















