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 8886867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:39:47+00:00 2026-06-14T21:39:47+00:00

So I am new to using Scheme/Guile and have an assignment where I must

  • 0

So I am new to using Scheme/Guile and have an assignment where I must take 2 inputs; a simple variable and a list.

I then add the variable to each number in the list and print it out. I have got it to load but when I enter this:

(add 1 (1 2 3))

I get this error:

Backtrace:
  39: 0* [add 1 ...
  39: 1*  [1 2 3]

standard inout:39:8: In expression (1 2 3):
standard input:39:8:wrong type to appy: 1
ABORT: (misc-error)

Here is the code that I currently have.

(define a (list a))
(define (add y a)
    (define x 0)
    (while (< x (length a))
        (display (+ y (car a)))
        (newline)
        (set! a (cdr a))
        (set! x (+ x 1))
    )
)

My question is:
How do I get the list to work in the parameter? I have looked around online but havent found much to fix this problem.
Many thanks ahead of time for any help you can give me.

  • 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-14T21:39:48+00:00Added an answer on June 14, 2026 at 9:39 pm

    You’re getting an error because (1 2 3) tells it to call the function 1 with two arguments, 2 and 3. To create a list containing 1, 2 and 3, use (list 1 2 3).

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

Sidebar

Related Questions

I'm new to Scheme, have been using MIT Scheme for sometime now. I'm trying
I'm new using Yii framework. I show a list a checkbox. But it's not
I can't understand general scheme using certificates. For example: I have account on the
I am using Lion. I have an error that outputs on every new terminal
I have a problem: i need to find an average of the list using
What's the point of using the set! assignment operator in scheme? Why not just
Using VisualStudio 2008, have emacs keyboard mapping scheme enabled. If I select text and
I'm new using the excellent stuff of css twitter bootstrap and having a problem,
I still new using Asp.net with vb.net Protected Sub login_Click(ByVal sender As Object, ByVal
New at using admob within Android. Is it possible to show ads with certain

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.