This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
1
Question about recursion(Scheme R5RS)
Post Body
(define (fibonacci n)
(cond ((= n 0) 0)
((= n 1) 1)
(else ( (fibonacci (- n 1)) (fibonacci (- n 2))))))
(fibonacci 8)
So in the last line of code. Does the code recurse over fibonacci (- n 1) till it becomes false? or does it go to fibonacci(- n 1), then go to fibonacci(- n 2) and then go back to fibonacci(- n 1). Let me know if the question doesn't make sense!
Author
User Disabled
Account Strength
0%
Disabled 5 months ago
Account Age
4 years
Verified Email
No
Verified Flair
No
Total Karma
530
Link Karma
351
Comment Karma
105
Profile updated: 1 day ago
Posts updated: 6 months ago
Subreddit
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 3 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/learnprogra...