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

Missing Return Keyword in Solution to Exercise 2.11 #997

Open
bpetermann opened this issue May 15, 2024 · 0 comments
Open

Missing Return Keyword in Solution to Exercise 2.11 #997

bpetermann opened this issue May 15, 2024 · 0 comments

Comments

@bpetermann
Copy link

bpetermann commented May 15, 2024

In the solution to task 2.11, the return keyword is missing in the the_trouble_maker function, which leads to the Error: head(xs) expects a pair as argument xs, but encountered undefined

function the_trouble_maker(xl, xu, yl, yu) {
    const p1 = xl * yl;
    const p2 = xl * yu;
    const p3 = xu * yl;
    const p4 = xu * yu;
    // Missing return
   make_interval(math_min(p1, p2, p3, p4),
                  math_max(p1, p2, p3, p4));
}
@bpetermann bpetermann changed the title Missing Return Statement in Solution to Exercise 2.11 Missing Return Keyword in Solution to Exercise 2.11 May 15, 2024
bpetermann added a commit to bpetermann/sicp that referenced this issue May 15, 2024
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