File: lambda.html

package info (click to toggle)
gcl 2.6.14-21
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 60,864 kB
  • sloc: ansic: 177,407; lisp: 151,509; asm: 128,169; sh: 22,510; cpp: 11,923; tcl: 3,181; perl: 2,930; makefile: 2,360; sed: 334; yacc: 226; lex: 95; awk: 30; fortran: 24; csh: 23
file content (96 lines) | stat: -rw-r--r-- 3,769 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>lambda (ANSI and GNU Common Lisp Document)</title>

<meta name="description" content="lambda (ANSI and GNU Common Lisp Document)">
<meta name="keywords" content="lambda (ANSI and GNU Common Lisp Document)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html" rel="start" title="Top">
<link href="Evaluation-and-Compilation-Dictionary.html" rel="up" title="Evaluation and Compilation Dictionary">
<link href="compile.html" rel="next" title="compile">
<link href="lambda-_0028Symbol_0029.html" rel="prev" title="lambda (Symbol)">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<span id="lambda"></span><div class="header">
<p>
Next: <a href="compile.html" accesskey="n" rel="next">compile</a>, Previous: <a href="lambda-_0028Symbol_0029.html" accesskey="p" rel="prev">lambda (Symbol)</a>, Up: <a href="Evaluation-and-Compilation-Dictionary.html" accesskey="u" rel="up">Evaluation and Compilation Dictionary</a> &nbsp; </p>
</div>
<hr>
<span id="lambda-_005bMacro_005d"></span><h4 class="subsection">3.8.2 lambda                                                              [Macro]</h4>

<p><code>lambda</code>  <i>lambda-list [[{<i>declaration</i>}* | <i>documentation</i>]] {<i>form</i>}*</i> &rArr;  <i><i>function</i></i>
</p>
<span id="Arguments-and-Values_003a_003a"></span><h4 class="subsubheading">Arguments and Values::</h4>

<p><i>lambda-list</i>&mdash;an <i>ordinary lambda list</i>.
</p>
<p><i>declaration</i>&mdash;a <b>declare</b> <i>expression</i>; not evaluated.
</p>
<p><i>documentation</i>&mdash;a <i>string</i>; not evaluated.
</p>
<p><i>form</i>&mdash;a <i>form</i>.
</p>
<p><i>function</i>&mdash;a <i>function</i>.
</p>
<span id="Description_003a_003a-1"></span><h4 class="subsubheading">Description::</h4>

<p>Provides a shorthand notation for a <b>function</b> <i>special form</i>
involving a <i>lambda expression</i> such that:
</p>
<div class="example">
<pre class="example">    (lambda <i>lambda-list</i> [[{<i>declaration</i>}* | <i>documentation</i>]] {<i>form</i>}*)
 &equiv; (function (lambda <i>lambda-list</i> [[{<i>declaration</i>}* | <i>documentation</i>]] {<i>form</i>}*))
 &equiv; #'(lambda <i>lambda-list</i> [[{<i>declaration</i>}* | <i>documentation</i>]] {<i>form</i>}*)
</pre></div>

<span id="Examples_003a_003a"></span><h4 class="subsubheading">Examples::</h4>

<div class="example">
<pre class="example"> (funcall (lambda (x) (+ x 3)) 4) &rArr;  7
</pre></div>

<span id="See-Also_003a_003a-1"></span><h4 class="subsubheading">See Also::</h4>

<p><b>lambda</b> (symbol)
</p>
<span id="Notes_003a_003a-1"></span><h4 class="subsubheading">Notes::</h4>

<p>This macro could be implemented by:
</p>
<div class="example">
<pre class="example">(defmacro lambda (&amp;whole form &amp;rest bvl-decls-and-body)
  (declare (ignore bvl-decls-and-body))
  `#',form)
</pre></div>




</body>
</html>