views:

93

answers:

3

Sometimes in Scheme, I have functions that take arguments like this

add 3 4

What do you call this kind of "list" where it's elements are like a1 a2 a3 ? I don't think you can call it a list because lists are contained in parenthesis and elements are comma-seperated.

+4  A: 

The (add 3 4) statement is "function application" from the lambda calculus. The 3 4 from the expression are bindings for the parameters; alternatively, it is the parameter list for the function.

Michael Aaron Safyan
Yeah, but it's still a lit. You can take a car of it.
MK
+2  A: 

Lisp uses prefix or Polish notation syntax.

Polish notation, also known as prefix notation, is a form of notation for logic, arithmetic, and algebra. Its distinguishing feature is that it places operators to the left of their operands. If the arity of the operators is fixed, the result is a syntax lacking parentheses or other brackets, that can still be parsed without ambiguity.

add is the operator and the right part are the operands.

The arity of the operators isn't fixed so Lisp uses parens in it's syntax to group the expressions.

Nick D
+4  A: 

s-expression?

newacct