about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-05-13 20:40:21 -0700
committerKartik Agaram <vc@akkartik.com>2018-05-13 20:41:21 -0700
commitecfa21dd5a107e8a8d05c36ca2a2c4a018e383a5 (patch)
tree288968b7378b37a15ee1afa863ad7529aa56307a
parent059def11cb8c53d85f7eed2af98a0bca0120a9cc (diff)
downloadmu-ecfa21dd5a107e8a8d05c36ca2a2c4a018e383a5.tar.gz
4245 - fix example1.mu to actually run
Thanks mahmudov on freenode IRC for the feedback! This was an
embarrassing oversight right at the top of my Readme.
-rw-r--r--example1.mu4
-rw-r--r--html/example1.mu.html8
2 files changed, 9 insertions, 3 deletions
diff --git a/example1.mu b/example1.mu
index aebf22ba..83995a1e 100644
--- a/example1.mu
+++ b/example1.mu
@@ -1,5 +1,7 @@
-def example1 [
+def main [
   local-scope
   a:num <- add 2, 2
   a <- multiply a, 3
+  # uncomment the next line to see the output
+# $print a
 ]
diff --git a/html/example1.mu.html b/html/example1.mu.html
index 2ff1fd66..35320c38 100644
--- a/html/example1.mu.html
+++ b/html/example1.mu.html
@@ -19,6 +19,8 @@ a:hover { text-decoration: underline; }
 .Special { color: #c00000; }
 .Constant { color: #00a0a0; }
 .LineNr { color: #444444; }
+.Comment { color: #9090ff; }
+.Comment a { color:#0000ee; text-decoration:underline; }
 -->
 </style>
 
@@ -53,11 +55,13 @@ if ('onhashchange' in window) {
 </head>
 <body onload='JumpToLine();'>
 <pre id='vimCodeElement'>
-<span id="L1" class="LineNr">1 </span><span class="muRecipe">def</span> <a href='example1.mu.html#L1'>example1</a> [
+<span id="L1" class="LineNr">1 </span><span class="muRecipe">def</span> <a href='example1.mu.html#L1'>main</a> [
 <span id="L2" class="LineNr">2 </span>  <span class="Constant">local-scope</span>
 <span id="L3" class="LineNr">3 </span>  a:num <span class="Special">&lt;-</span> add<span class="Constant"> 2</span>,<span class="Constant"> 2</span>
 <span id="L4" class="LineNr">4 </span>  a <span class="Special">&lt;-</span> multiply a,<span class="Constant"> 3</span>
-<span id="L5" class="LineNr">5 </span>]
+<span id="L5" class="LineNr">5 </span>  <span class="Comment"># uncomment the next line to see the output</span>
+<span id="L6" class="LineNr">6 </span><span class="Comment"># $print a</span>
+<span id="L7" class="LineNr">7 </span>]
 </pre>
 </body>
 </html>