about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--Readme.md43
-rw-r--r--html/fork.pngbin0 -> 19933 bytes
-rw-r--r--html/tangle.pngbin0 -> 42367 bytes
3 files changed, 2 insertions, 41 deletions
diff --git a/Readme.md b/Readme.md
index c47ef1cd..64124181 100644
--- a/Readme.md
+++ b/Readme.md
@@ -443,31 +443,7 @@ something like this:
 An alternative way to define factorial is by inserting *labels* and later
 inserting code at them.
 
-  ```nim
-  def factorial [
-    local-scope
-    n:number <- next-ingredient
-    {
-      <base-case>
-    }
-    <recursive-case>
-  ]
-
-  after <base-case> [
-    # if n=0 return 1
-    zero?:boolean <- equal n, 0
-    break-unless zero?
-    return 1
-  ]
-
-  after <recursive-case> [
-    # return n * factorial(n-1)
-    x:number <- subtract n, 1
-    subresult:number <- factorial x
-    result:number <- multiply subresult, n
-    return result
-  ]
-  ```
+<img alt='literate programming' src='html/tangle.png'>
 
 (You'll find this version in `tangle.mu`.)
 
@@ -480,22 +456,7 @@ names for inserting code at.
 
 Another example, this time with concurrency.
 
-  ```
-  def main [
-    start-running thread2
-    {
-      $print 34
-      loop
-    }
-  ]
-
-  def thread2 [
-    {
-      $print 35
-      loop
-    }
-  ]
-  ```
+<img alt='forking concurrent routines' src='html/fork.png'>
 
   ```shell
   $ ./mu fork.mu
diff --git a/html/fork.png b/html/fork.png
new file mode 100644
index 00000000..f7bfcf5c
--- /dev/null
+++ b/html/fork.png
Binary files differdiff --git a/html/tangle.png b/html/tangle.png
new file mode 100644
index 00000000..beda9eb0
--- /dev/null
+++ b/html/tangle.png
Binary files differ