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

  • Home
  • SEARCH
  • 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 7734633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:17:53+00:00 2026-06-01T07:17:53+00:00

Well, I am trying to use an element of function list.But i am having

  • 0

Well, I am trying to use an element of function list.But i am having problem to use it in my code.

(func (list sum) (list 1 2 3)) i am trying to apply sum element in the list1 to my list2 . sum is described as taking list as argument. I just took one function in list1 for try. However

    (display (car list1)) --> sum
    (display list2)--->(1 2 3)
    (display (list (sum list2)))--->(6)
    (display ((car list1) list2))---> ERROR 

ERROR:function call: expected a function after the open parenthesis, but received ‘sum

I can’t understand why it does give this error. As you see (car list1) refers to sum and list2 refers to (1 2 3) llpist.

Can you tell me if i got anything wrong? Thx.

  • 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-01T07:17:54+00:00Added an answer on June 1, 2026 at 7:17 am

    We need to see the implementation of sum and the exact way you’re creating the lists, I’m guessing that you’re passing the symbol 'sum and not the procedure sum. When I try the following it works without the problem you’re reporting:

    ; this is guesswork, OP didn't provide enough information
    (define sum (lambda (lst) (apply + lst)))
    (define list1 (list sum))
    (define list2 (list 1 2 3))
    
    (display (car list1))
    (display list2)
    (display (list (sum list2)))
    (display ((car list1) list2)) ; this works for me
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use jQuery to add dynamic Add/Remove row function, but I meet
I am new to salesforce and apex as well. trying to use to understand
Well I'm trying to set a variable to use in a thread, it works
Well im trying to write my own custom control extender but i can't get
Well I am trying to learn the java MVC pattern, but I can't understand
I've got a fairly long list of divs which I'm trying to use as
I am trying to use jquery autocomplete plugin in my application. It works well
Well, this is not really a problem, but something really interests me. Normally we
well iam trying to get version of IE used by user by using $.browser.version
Hi guys thanks for pay attention to this. Well im trying to replace every

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.