Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An erratum on page 226 #33

Open
ShorterThanDijkstra opened this issue Jan 15, 2023 · 0 comments
Open

An erratum on page 226 #33

ShorterThanDijkstra opened this issue Jan 15, 2023 · 0 comments

Comments

@ShorterThanDijkstra
Copy link

About the code of exercise 6.34 in page 226, I think it should be

(define fib/anf
  (lambda (n)
    (if (< n 2)
        n
        (let ((val1 (fib/anf (- n 1)))
              (val2 (fib/anf (- n 2))))
          (+ val1 val2)))))

instead of

(define fib/anf
  (lambda (n)
    (if (< n 2)
        1
        (let ((val1 (fib/anf (- n 1)))
              (val2 (fib/anf (- n 2))))
          (+ val1 val2)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant