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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:01:05+00:00 2026-05-23T20:01:05+00:00

Suppose there are two functions, f and v. Assume further that v returns a

  • 0

Suppose there are two functions, f and v. Assume further that v returns a list of length n and f expects exactly n arguments. I am looking for the correct syntax in Scheme for applying f to the list returned by v.

If I use the syntax (f (v v-arguments)) then I get an error about f expectsing n arguments but receiving only one argument (which is the list returned by v).

If I use the syntax (f . (v v-arguments)), then the problem is too many arguments passed to f.

The best I could do (for the case when f expects two arguments) is this:

(let ((output-of-v (v v-arguments)))
  (f (car output-of-v) (cadr output-of-v)))

I am sure there must be a better way and I would be grateful for any advice!

  • 1 1 Answer
  • 2 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-05-23T20:01:06+00:00Added an answer on May 23, 2026 at 8:01 pm

    It seems you’re looking for apply:

    (apply f (v v-arguments))
    

    As explained here, the apply function applies a function to a list of arguments, effectively passing them as positional arguments to that function.

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

Sidebar

Related Questions

Suppose that there're two types of packet in the chatting server. Those two packets
Suppose i have one folder and inside that another two files are there .
Suppose you have a Django view that has two functions: The first function renders
Suppose there are two lists a = {a1, a2, a3} and b = {b1,
Suppose you have two linked servers called Local and Remote respectively. Is there a
Suppose I have two functions: Foo(params INotifyPropertyChanged[] items) { //do stuff } Foo<T>(IEnumerable<T> items)
Suppose that I have two data types Foo and Bar. Foo has fields x
For example, suppose we have two functions: void sum(int x, int y) { return
My problem is that I have two functions and one of the functions calls
Suppose I have a DB of users and I have two main functions: to

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.