Go to the previous, next section.

A  lambda Expression

 lambda is the symbol for an anonymous function, a function without a name. Every time you use an anonymous function, you need to include its whole body.


(lambda (arg) (/ arg 50))

is a function definition that says `return the value resulting from dividing whatever is passed to me as  arg by 50'.

Earlier, for example, we had a function  multiply-by-seven ; it multiplied its argument by 7. This function is similar, except it divides its argument by 50; and, it has no name. The anonymous equivalent of  multiply-by-seven is:

(lambda (number) (* 7 number))

(@xref{defun, , The

} defun Special Form}.) If we want to multiply 3 by 7, we can write:

This expression returns 21.

Similarly, we can write:

If we want to divide 100 by 50, we can write:

This expression returns 2. The 100 is passed to the function, which divides that number by 50.

See section 'Lambda Expressions' in The GNU Emacs Lisp Reference Manual, for more about  lambda . Lisp and lambda expressions derive from the Lambda Calculus.

Go to the previous, next section.