[e-cvs] cvs commit: e/doc/elang/quasi like-ellipses.html
markm@eros.cs.jhu.edu
markm@eros.cs.jhu.edu
Sat, 22 Dec 2001 23:56:34 -0500
markm 01/12/22 23:56:34
Modified: doc/elang/quasi like-ellipses.html
Log:
typos
Revision Changes Path
1.2 +6 -11 e/doc/elang/quasi/like-ellipses.html
Index: like-ellipses.html
===================================================================
RCS file: /cvs/e/doc/elang/quasi/like-ellipses.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- like-ellipses.html 2001/12/23 04:49:30 1.1
+++ like-ellipses.html 2001/12/23 04:56:34 1.2
@@ -55,7 +55,7 @@
<ul>
<li>'?' means optional -- zero or one occurrence.</li>
<li>'+' means one or more occurrences.</li>
- <li>'*' means one or more occurrences.</li>
+ <li>'*' means zero or more occurrences.</li>
</ul>
<P ALIGN="left">These quantifiers normally just annotate patterns. Why do
we also apply them to expressions? In order to incorporate the expressiveness
@@ -123,8 +123,7 @@
in the above. Take for example the pattern
<pre
class="programlisting"
->(a (b c ...) (d e ...) ...)
-</pre
+>(a (b c ...) (d e ...) ...)</pre
>
What matters is how many ellipsis <i
class="emphasis"
@@ -155,8 +154,7 @@
the above pattern can supply the input for the template
<pre
class="programlisting"
->((a c ...) (b d ...) (e ...) ...)
-</pre
+>((a c ...) (b d ...) (e ...) ...)</pre
>
The structural ellipsis count of the template variables matches
that of the pattern, whereas the lexical template count is
@@ -239,8 +237,7 @@
>(define-syntax foo
(syntax-rules ()
((foo (a ...) (b ...)) '((a b) ...))))
-(foo (1 2) (3 4 5)) ;=> ?
-</pre
+(foo (1 2) (3 4 5)) ;=> ?</pre
>
In different Schemes this is either an error or produces
the result <tt
@@ -327,8 +324,7 @@
>(define-syntax foo
(syntax-rules ()
((foo (a ...) (b ...) ...) '(((a b) ...) ...))))
-(foo (1 2) (3 4) (5 6 7)) ;=> '(((1 3) (1 4)) ((2 5) (2 6) (2 7)))
-</pre
+(foo (1 2) (3 4) (5 6 7)) ;=> '(((1 3) (1 4)) ((2 5) (2 6) (2 7)))</pre
>
produces the desired result. Note however that in any ellipses
sub-template there must be at least one template variable
@@ -366,8 +362,7 @@
# [1, 4]],
# [[2, 5],
# [2, 6],
-# [2, 7]]]`
-</pre>
+# [2, 7]]]`</pre>
</blockquote>
<p>Since literal data is repeated as many times as necessary, variables
that are too flat, like <code>a</code> above, are treated in a way that's