Re:I wear your shirt
by tome on Wednesday November 25, 2009 @10:11AM
(#961190)
or
[ Parent
| on HN ]
(sum (range 1 365))
assuming you defined these already; I have them in my utils library ;-) (defun range (start end)
(loop for x from start to end collecting x))
(defun sum (sequence)
(reduce #'+ sequence))didn't even think of that one! :)
Re:I wear your shirt
by karanbhangui on Wednesday November 25, 2009 @12:52PM
(#961519)
or plain math: n(n+1)/2
How quickly can you generalize the plain math formula to these sequences: http://www.research.att.com/njas/sequences/index.html