Permalink
Browse files

Add let and let* examples.

  • Loading branch information...
1 parent 8423978 commit e4fb34b60ec86e3b25179ace5731f0e0c3e30139 @manuel committed Sep 16, 2012
Showing with 50 additions and 2 deletions.
  1. +38 −2 doc/manual.html
  2. +12 −0 doc/manual.org
View
@@ -7,7 +7,7 @@
<title>Wat Language Manual</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="generator" content="Org-mode"/>
-<meta name="generated" content="2012-09-16 17:24:05 CEST"/>
+<meta name="generated" content="2012-09-16 17:29:12 CEST"/>
<meta name="author" content="Manuel Simoni"/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
@@ -666,6 +666,24 @@ <h3 id="sec-6.4"><code>let &lt;bindings&gt; . &lt;body&gt; → result</code> [op
<p>
Usual Scheme <code>let</code>.
</p>
+
+</div>
+
+<div id="outline-container-6.4.1" class="outline-4">
+<h4 id="sec-6.4.1">Examples </h4>
+<div class="outline-text-4" id="text-6.4.1">
+
+
+
+
+
+<pre class="example">(assert (= 3 (let ((x 1) (y 2)) (+ x y))))
+</pre>
+
+
+
+
+</div>
</div>
</div>
@@ -682,6 +700,24 @@ <h3 id="sec-6.5"><code>let* &lt;bindings&gt; . &lt;body&gt; → result</code> [o
<code>letrec</code> and <code>letrec*</code> are not provided because their effect can be
obtained with a sequence of <code>define</code> expressions.
</p>
+
+</div>
+
+<div id="outline-container-6.5.1" class="outline-4">
+<h4 id="sec-6.5.1">Examples </h4>
+<div class="outline-text-4" id="text-6.5.1">
+
+
+
+
+
+<pre class="example">(assert (= 3 (let* ((x 1) (y (+ x 1))) (+ x y))))
+</pre>
+
+
+
+
+</div>
</div>
</div>
@@ -2926,7 +2962,7 @@ <h3 id="sec-25.1">Error Monad </h3>
<p class="author"> Author: Manuel Simoni
<a href="mailto:msimoni@gmail.com">&lt;msimoni@gmail.com&gt;</a>
</p>
-<p class="date"> Date: 2012-09-16 17:24:05 CEST</p>
+<p class="date"> Date: 2012-09-16 17:29:12 CEST</p>
</div>
</div>
</body>
View
@@ -219,13 +219,25 @@ Scheme-like =define-syntax= with two cases:
Usual Scheme =let=.
+*** Examples
+
+#+BEGIN_EXAMPLE
+(assert (= 3 (let ((x 1) (y 2)) (+ x y))))
+#+END_EXAMPLE
+
** =let* <bindings> . <body> → result= [operative]
Usual Scheme =let*=.
=letrec= and =letrec*= are not provided because their effect can be
obtained with a sequence of =define= expressions.
+*** Examples
+
+#+BEGIN_EXAMPLE
+(assert (= 3 (let* ((x 1) (y (+ x 1))) (+ x y))))
+#+END_EXAMPLE
+
** =set! <env> <lhs> <rhs> → rhs= [operative]
Updates the left-hand side by matching it against the right-hand side

0 comments on commit e4fb34b

Please sign in to comment.