From 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 14 Aug 2025 22:58:58 -0500 Subject: removing all downloaded devdocs files --- devdocs/elisp/simple-lambda.html | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 devdocs/elisp/simple-lambda.html (limited to 'devdocs/elisp/simple-lambda.html') diff --git a/devdocs/elisp/simple-lambda.html b/devdocs/elisp/simple-lambda.html deleted file mode 100644 index 9543224d..00000000 --- a/devdocs/elisp/simple-lambda.html +++ /dev/null @@ -1,15 +0,0 @@ -

A Simple Lambda Expression Example

Consider the following example:

(lambda (a b c) (+ a b c))
-
-

We can call this function by passing it to funcall, like this:

(funcall (lambda (a b c) (+ a b c))
-         1 2 3)
-
-

This call evaluates the body of the lambda expression with the variable a bound to 1, b bound to 2, and c bound to 3. Evaluation of the body adds these three numbers, producing the result 6; therefore, this call to the function returns the value 6.

Note that the arguments can be the results of other function calls, as in this example:

(funcall (lambda (a b c) (+ a b c))
-         1 (* 2 3) (- 5 4))
-
-

This evaluates the arguments 1, (* 2 3), and (- 5 -4) from left to right. Then it applies the lambda expression to the argument values 1, 6 and 1 to produce the value 8.

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 (see Local Variables). Lambda expressions are mainly used as anonymous functions for passing as arguments to other functions (see Anonymous Functions), or stored as symbol function definitions to produce named functions (see Function Names).

-

- Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
- https://www.gnu.org/software/emacs/manual/html_node/elisp/Simple-Lambda.html -

-
-- cgit v1.2.3