Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8648449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:18:57+00:00 2026-06-12T13:18:57+00:00

This is an example in SICP, I enter it but it has an error.

  • 0

This is an example in SICP, I enter it but it has an error.

(define (sum term a next b)
  (if (> a b)
      0
      (+ (term a)
         (sum term (next a) next b))))

This is the error:

function call: expected a function after the open parenthesis, but found a variable

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:18:58+00:00Added an answer on June 12, 2026 at 1:18 pm

    If you are using DrRacket, you may be running DrRacket under the “Beginner Student Language” mode. At the introductory CS level, that particular language level mode disables higher-order functions. SICP, on the other hand, assumes a language level that allows higher-order procedures.

    Assuming this is the case, you can fix this by adjusting DrRacket so it uses a language level that allows higher-order procedures such as #lang racket.

    See Choosing a Language: switch DrRacket over to “Use the language declared in the source”, and make the top line of your program:

    #lang racket
    

    That should then let you write your function.


    By the way there is specialized support for SICP for DrRacket; if you’re going to go through SICP, you probably want to use this. You can enable this support by changing the top #lang line to:

    #lang planet neil/sicp
    

    It’ll take a little time the first time you run a program with this, as it automatically installs the support software; subsequent use of the package should be fast.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This example works but I think that the memory leaks. Function used in the
This example is simplified a bit, but in my ASP.NET web page in my
This example is taken from the Java programming book; 4th Edition. After stumbling upon
Consider this example - the table item has two columns, key and value .
This example is a simplification of the real problem, but how can I get
This example is contrived, but it shows my point. So, if I have an
This example is from php.net: <?php function Test() { static $a = 0; echo
Given this example taken from http://php.net/manual/en/function.crypt.php crypt('rasmuslerdorf', '$2a$07$usesomesillystringforsalt$') Firstly: What is the length that
This example works great for one or the other, but not both: public void
This example has been used in another question to illustrate how coroutines can be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.