Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does ' have an effect in special forms in Lisp?

Tags:

lisp

quote

Will ' affect the evaluation of special forms? Example: (function 'function-name). If this doesn't work, why?

like image 984
Thomson Avatar asked Feb 05 '11 12:02

Thomson


People also ask

Why are special forms required in programming languages?

A special form is a primitive function specially marked so that its arguments are not all evaluated. Most special forms define control structures or perform variable bindings—things which functions cannot do. Each special form has its own rules for which arguments are evaluated and which are used without evaluation.

What is special form in Scheme?

A special form is an expression that follows special evaluation rules. This chapter describes the basic Scheme special forms.

What are forms in Lisp?

The standard unit of interaction with a Common Lisp implementation is the form, which is simply a data object meant to be evaluated as a program to produce one or more values (which are also data objects). One may request evaluation of any data object, but only certain ones are meaningful.

Is lambda a special form?

Lambda is the name of a special form that generates procedures.


1 Answers

'name is read to (quote name).

FUNCTION expects a name for a function, a list (setf some-name) or a lambda expression.

(quote name) is neither. So it is an error to use it.

like image 61
Rainer Joswig Avatar answered Nov 11 '22 15:11

Rainer Joswig