1

What does this text mean, in node Simple Lambda Expression Example of the Emacs Lisp manual:

As these examples show, you can use a form with a lambda expression as its car to make local variables and give them values. In the old days of Lisp, this technique was the only way to bind and initialize local variables. But nowadays, it is clearer to use the special form let for this purpose

The use of let is clear to me, but what does car have to do with this?

Drew
  • 75,699
  • 9
  • 109
  • 225
uanr81
  • 169
  • 7
  • https://emacs.stackexchange.com/tags/elisp/info – Drew Oct 02 '20 at 18:50
  • Good afternoon. Explain why you provided this link? I am translating the manual into Russian, so such questions arise. – uanr81 Oct 04 '20 at 03:14
  • There's nothing wrong with the question. I removed tag `elisp` from it; that's all. That tag isn't for questions about using Elisp to do something. It's for questions about the nature of the language, in particular compared to other Lisp dialects. The linked explanation covers the purpose of the tag. – Drew Oct 04 '20 at 04:11
  • And thanks for translating the Elisp manual! That's a great undertaking. – Drew Oct 04 '20 at 04:12
  • Thanks for the clarification – uanr81 Oct 04 '20 at 06:03

1 Answers1

3

The application of a lambda expression was used to populate the local variables in the expression, so for example what you can today write as

(let ((x 12))
  (message (number-to-string (- (* 4 x) (/ x 2)))))

you wrote as

((lambda (x)
   (message (number-to-string (- (* 4 x) (/ x 2)))))
 12)

The lambda expression is the car of the whole form.

choroba
  • 1,925
  • 10
  • 16