Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

281
Visualizações
Apply function to arguments or Apply arguments to function

Recently I am reading book SICP javascript. ( https://sourceacademy.org/sicpjs/1.1.4 )

And in this book ( chapter 1.1.4 ) I have a question about how function works.

function-expression(argument-expressions)

eg. square(2 + 5);

To evaluate a function application, the interpreter follows a procedure quite similar to the procedure for operator combinations described in section 1.1.3.

To evaluate a function application, do the following:

  1. Evaluate the subexpressions of the application, namely the function expression and the argument expressions.
  2. Apply the function that is the value of the function expression to the values of the argument expressions.

Where I have a question is number 2.

Before I read this book, when I use function, I just thought like pass the arguments to function.

So I have a confusion between Apply function to arguments or Apply arguments to function

This book said Apply function to arguments.

Can I get an answer why that is right and difference between them?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

There is no difference. An application applies two things together. It's just math speak, or English peculiarities. Both phrases just mean that a function call is being made.

But also, the book is being more precise than what you were thinking. Instead of just saying "arguments", it talks about "arguments' values". Because, in f(x,y), or equally (f x y), what is the function being called? After all f or x are just names of variables.

So the book says, the value of the variable f is used as the function, which is called with the value of the variable x, and of y, as the argument values.

Because there are other call disciplines, e.g. in "call by name" the variables themselves are passed in as the arguments. But Scheme (as originally used by the book) is "call by value".

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda