/usr/share/doc/r5rs-doc/r5rs/Definitions.html is in r5rs-doc 20010328-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <html lang="en">
<head>
<title>Definitions - Revised(5) Scheme</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Revised(5) Scheme">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Program-structure.html#Program-structure" title="Program structure">
<link rel="prev" href="Programs.html#Programs" title="Programs">
<link rel="next" href="Syntax-definitions.html#Syntax-definitions" title="Syntax definitions">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Definitions"></a>
<p>
Next: <a rel="next" accesskey="n" href="Syntax-definitions.html#Syntax-definitions">Syntax definitions</a>,
Previous: <a rel="previous" accesskey="p" href="Programs.html#Programs">Programs</a>,
Up: <a rel="up" accesskey="u" href="Program-structure.html#Program-structure">Program structure</a>
<hr>
</div>
<h3 class="section">5.2 Definitions</h3>
<ul class="menu">
<li><a accesskey="1" href="Top-level-definitions.html#Top-level-definitions">Top level definitions</a>
<li><a accesskey="2" href="Internal-definitions.html#Internal-definitions">Internal definitions</a>
</ul>
<p><a name="index-g_t_0040w_007bdefinitions_007d-171"></a>
<p>Definitions are valid in some, but not all, contexts where expressions
are allowed. They are valid only at the top level of a <span class="roman"><program></span>
and at the beginning of a <span class="roman"><body></span>.
<p><a name="index-g_t_0040w_007bdefinition_007d-172"></a>
A definition should have one of the following forms:
<a name="index-g_t_0040w_007bdefine_007d-173"></a>
<ul>
<li><tt>(define </tt><span class="roman"><variable></span> <span class="roman"><expression></span><tt>)</tt>
<li><tt>(define (</tt><span class="roman"><variable></span> <span class="roman"><formals></span><tt>) </tt><span class="roman"><body></span><tt>)</tt>
<p><span class="roman"><Formals></span> should be either a
sequence of zero or more variables, or a sequence of one or more
variables followed by a space-delimited period and another variable (as
in a lambda expression). This form is equivalent to
<pre class="example">
(define <span class="roman"><variable></span>
(lambda (<span class="roman"><formals></span>) <span class="roman"><body></span>))<span class="roman">.</span>
</pre>
<li><tt>(define (</tt><span class="roman"><variable></span><tt> . </tt><span class="roman"><formal></span><tt>) </tt><span class="roman"><body></span><tt>)</tt>
<p><span class="roman"><Formal></span> should be a single
variable. This form is equivalent to
<pre class="example">
(define <span class="roman"><variable></span>
(lambda <span class="roman"><formal></span> <span class="roman"><body></span>))<span class="roman">.</span>
</pre>
</ul>
</body></html>
|