[racket] Sum of Even
I am trying to do a recursive analysis on the Sum of even numbers function. So far I have already defined the function. I have found the base case. The hard part is finding the non-recursive definition. I'm having trouble of what non-recursive definition even means.
Step 1 - Base case: sumEven(N) = 2, if N = 1
Step 2 - Non-recursive definition =
(define sumEven
(lambda (N)
(cond((= N 1) 2)
((> N 0) (*(+ N 1)N)))))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120925/5fed775c/attachment-0001.html>