diff --git a/doc/1_KC3/1.1_Introduction.en.md b/doc/1_KC3/1.1_Introduction.en.md
index 6f6af20..81b06f5 100644
--- a/doc/1_KC3/1.1_Introduction.en.md
+++ b/doc/1_KC3/1.1_Introduction.en.md
@@ -26,7 +26,7 @@ and is named with a symbol starting with a uppercase character.
For instance `Sym` and `Str` are valid module names.
Use defmodule to define a module. Example :
-```
+```elixir
defmodule Test do
def one = 1
def double = fn (x) { x * 2 }
@@ -39,7 +39,7 @@ type name if the corresponding module defines a type.
Use defstruct to define a struct type in a module. The struct will have
the same name as the module. Example :
-```
+```elixir
ikc3> defmodule Test do
ikc3> defstruct [x: (F32) 0.0,
ikc3> y: (F32) 0.0]
@@ -91,6 +91,8 @@ Basic data types in KC3 are :
---
+Top : [KC3 documentation](/doc/)
+
Previous : [1 KC3](/doc/1_KC3)
Next : [1.2 Integer](1.2_Integer)
diff --git a/doc/1_KC3/1.2_Integer.en.md b/doc/1_KC3/1.2_Integer.en.md
index 0858b38..35c7c18 100644
--- a/doc/1_KC3/1.2_Integer.en.md
+++ b/doc/1_KC3/1.2_Integer.en.md
@@ -17,7 +17,7 @@ not as a pointer, and for these reasons are fast.
They do not need to be cleaned after use and thus can be used in arrays like
is usually done in C.
-```
+```elixir
ikc3> type(-1)
S8
ikc3> type(-128)
@@ -47,7 +47,7 @@ Their type is `Integer` and can support numbers as large as memory allows.
They are slow because they are allocated dynamically on the heap
using malloc.
-```
+```elixir
ikc3> type(1000000000000000000000000000000)
Integer
```
@@ -59,7 +59,7 @@ Integer
Binary not.
-```
+```elixir
ikc3> ~ 1
254
ikc3> ~ -1
@@ -81,7 +81,7 @@ Integer addition.
All positive integers can be defined in terms of addition of :
zero or a positive integer, and one. E.g.
-```
+```elixir
1 = 0 + 1
2 = 0 + 1 + 1
3 = 0 + 1 + 1 + 1
@@ -114,7 +114,7 @@ Left shift
## 1.2.4 Examples
-```
+```elixir
ikc3> type(1)
U8
ikc3> type(1000000000000000000000000000000)
@@ -129,6 +129,8 @@ ikc3> a * a / 1000000000000000000000000000000000000000000000000000
---
+Top : [KC3 documentation](/doc/)
+
Previous : [1.1 Introduction](1.1_Introduction)
Next : [1.3 Map](1.3_Map)
diff --git a/doc/1_KC3/1.3_Map.en.md b/doc/1_KC3/1.3_Map.en.md
index e01b71c..9a09d14 100644
--- a/doc/1_KC3/1.3_Map.en.md
+++ b/doc/1_KC3/1.3_Map.en.md
@@ -2,14 +2,14 @@
KC3 maps are like Elixir maps, they are key-values enclosed in `%{}` :
-```
+```elixir
ikc3> a = %{id: 1, title: "My title", message: "Hello, world !"}
%{id: 1, title: "My title", message: "Hello, world !"}
```
Destructuring works with maps to extract values :
-```
+```elixir
ikc3> %{id: id, title: "My title", message: message} = ^ a
%{id: 1, title: "My title", message: "Hello, world !"}
ikc3> id
@@ -21,7 +21,7 @@ ikc3> message
You can use the dot syntax to access map values from a `Sym` key :
-```
+```elixir
ikc3> a = %{id: 1, title: "My title", message: "Hello, world !"}
%{id: 1, title: "My title", message: "Hello, world !"}
ikc3> a.id
@@ -32,7 +32,7 @@ ikc3> a.message
You can also use the `KC3.access` function for the same result :
-```
+```elixir
ikc3> a = %{id: 1, title: "My title", message: "Hello, world !"}
%{id: 1, title: "My title", message: "Hello, world !"}
ikc3> access(a, :id)
@@ -43,6 +43,8 @@ ikc3> access(a, :message)
---
+Top : [KC3 documentation](/doc/)
+
Previous : [1.2 Integer](1.2_Integer)
Next : [1.4 Ratio](1.4_Ratio)
diff --git a/doc/1_KC3/1.4_Ratio.en.md b/doc/1_KC3/1.4_Ratio.en.md
index c8486fd..d24db32 100644
--- a/doc/1_KC3/1.4_Ratio.en.md
+++ b/doc/1_KC3/1.4_Ratio.en.md
@@ -5,7 +5,7 @@ which can be any number, and the denominator which has to be positive.
They represent fractions of integral numbers.
They are written with a slash and no space.
-```
+```elixir
ikc3> 1/2 + 2/3
7/6
ikc3> 1/2 * 2/3
@@ -18,6 +18,8 @@ ikc3> 1/2 - 2/3
---
+Top : [KC3 documentation](/doc/)
+
Previous : [1.3 Map](1.3_Map)
Next : [1.5 List](1.5_List)
diff --git a/doc/1_KC3/1.5_List.en.md b/doc/1_KC3/1.5_List.en.md
index 8fc46bd..c5ad99a 100644
--- a/doc/1_KC3/1.5_List.en.md
+++ b/doc/1_KC3/1.5_List.en.md
@@ -21,16 +21,18 @@ All these list formats are supported in pattern matching.
## 1.5.1 Functions
-```
+```elixir
List List.map (List, Fn)
```
-```
+```elixir
List List.reverse (List)
```
---
+Top : [KC3 documentation](/doc/)
+
Previous : [1.4 Ratio](1.4_Ratio)
Next : [1.6 Variable](1.6_Variable)
diff --git a/doc/1_KC3/1.6_Variable.en.md b/doc/1_KC3/1.6_Variable.en.md
index b9360c5..e33520f 100644
--- a/doc/1_KC3/1.6_Variable.en.md
+++ b/doc/1_KC3/1.6_Variable.en.md
@@ -29,7 +29,7 @@ You can also use the assignment operator which is `<-` which in turn calls
`tag_init_copy`. It works like the C assignment operator (`=`).
Examples :
-```
+```elixir
# Declare a unsigned byte 8 bits variable "x".
x = (U8) ?
# Set the variable "x" to zero.
@@ -51,6 +51,8 @@ read-only again so you can use it without locking.
---
+Top : [KC3 documentation](/doc/)
+
Previous : [1.5 List](1.5_List)
Next : [2 HTTPd](/doc/2_HTTPd)
diff --git a/doc/2_HTTPd/index.en.md b/doc/2_HTTPd/index.en.md
index 3edfe5b..7959cb8 100644
--- a/doc/2_HTTPd/index.en.md
+++ b/doc/2_HTTPd/index.en.md
@@ -53,3 +53,11 @@ The main layout for the application is stated in
`./app/templates/layout.html.ekc3` and `./app/templates/nav.html.ekc3`.
Notice the `.html.ekc3` extension, these are HTML files with embedded KC3.
See the [EKC3](/doc/EKC3) documentation for more information on these files.
+
+---
+
+Top : [KC3 Documentation](/doc/)
+
+Previous : [1 KC3](/doc/1_KC3/)
+
+Next : [3 Guides](/doc/3_Guides/)
diff --git a/doc/3_Guides/3.4_Structure.en.md b/doc/3_Guides/3.4_Structure.en.md
index 0df08ea..d1cd93d 100644
--- a/doc/3_Guides/3.4_Structure.en.md
+++ b/doc/3_Guides/3.4_Structure.en.md
@@ -42,10 +42,14 @@ Interactive shell. Terminal I/O provided by
[linenoise](https://github.com/antirez/linenoise/tree/1.0).
Example :
-```
+
+```sh
$ make test
$ ikc3/ikc3
-ikc3> ikc3> 1 + 1
+```
+
+```elixir
+ikc3> 1 + 1
2
ikc3> 2 + 2
4
@@ -80,7 +84,7 @@ The `List.map` and `List.reverse` functions are defined in
For example, without closing ikc3 let's redefine `List.reverse`,
open an editor and change the line in `lib/kc3/0.1/list.kc3` from
-```
+```elixir
def reverse = fn {
(x) { reverse(x, ()) }
([], acc) { acc }
@@ -90,7 +94,7 @@ open an editor and change the line in `lib/kc3/0.1/list.kc3` from
to
-```
+```elixir
def reverse = fn {
(x) { reverse(x, ()) }
([], acc) { [:reversed | acc] }
@@ -101,7 +105,7 @@ to
and check the results of the last command (up key) in ikc3/ikc3 :
-```
+```elixir
ikc3> List.reverse(List.map([1, 2, 3, 4], double))
[:reversed, 8, 6, 4, 2]
```
diff --git a/doc/3_Guides/3.5_Tutorial.en.md b/doc/3_Guides/3.5_Tutorial.en.md
index a7a2c35..3e4add9 100644
--- a/doc/3_Guides/3.5_Tutorial.en.md
+++ b/doc/3_Guides/3.5_Tutorial.en.md
@@ -9,7 +9,7 @@ KC3 maps are key-value stores, you can use any tag as a key and
associate a value to it.
You can use destructuring to access KC3 maps :
-```
+```elixir
ikc3> a = %{id: 1, title: "My title", message: "Hello, world !"}
%{id: 1, title: "My title", message: "Hello, world !"}
ikc3> a = %{}
@@ -23,7 +23,7 @@ ikc3> message
```
You can use the dot syntax to access map values from a `Sym` key :
-```
+```elixir
ikc3> a = %{id: 1, title: "My title", message: "Hello, world !"}
%{id: 1, title: "My title", message: "Hello, world !"}
ikc3> a.id
@@ -33,7 +33,7 @@ ikc3> a.message
```
You can also use the `KC3.access` function for the same result :
-```
+```elixir
ikc3> a = %{id: 1, title: "My title", message: "Hello, world !"}
%{id: 1, title: "My title", message: "Hello, world !"}
ikc3> access(a, :id)
@@ -48,7 +48,7 @@ ikc3> access(a, :message)
`ikc3` fully supports Unicode :
Some unicode characters :
-```
+```elixir
ikc3> '\U+1B2FB'
'𛋻'
ikc3> '𐅀'
@@ -60,7 +60,7 @@ ikc3>
## Large integers
-```
+```elixir
ikc3> a = 1 + 100000000000000000000000000000000
100000000000000000000000000000001
ikc3> a * a
@@ -75,7 +75,7 @@ which can be any number, and the denominator which has to be positive.
They represent fractions of integral numbers.
They are written with a slash and no space.
-```
+```elixir
ikc3> 1/2 + 2/3
7/6
ikc3> 1/2 * 2/3
@@ -94,7 +94,7 @@ numbers (unsigned, signed, float, ratios, and even other complex
numbers). For instance, you can write `a +i b` where `a` and `b` are
real numbers.
-```
+```elixir
ikc3> 1 +i 2
1 +i 2
ikc3> 1 +i 2 + 2 +i 3
@@ -146,7 +146,7 @@ which is called _destructuring_.
Examples :
-```
+```elixir
ikc3> a = 1
1
ikc3> a = 2
@@ -172,7 +172,7 @@ really helpful when writing large programs that need to scale in the way
of abstractions. Let the data flow in the code through visual types.
Examples :
-```
+```elixir
ikc3> [x, y | z] = List.reverse([1, 2, 3, 4])
[4, 3, 2, 1]
ikc3> x
@@ -206,7 +206,7 @@ free operations with `unwind-protect`, graph database operations like
## If, then, else.
Conditionals in KC3 are like in Ruby, for example :
-```
+```elixir
ikc3> if true && true
ikc3> 1 + 1
ikc3> 2 + 2
@@ -229,7 +229,7 @@ block gets evaluated. If the condition is false and an `else` block is
not provided, then `void` gets returned.
One liner examples with `then` :
-```
+```elixir
ikc3> if 42 then 100 else 101 end
100
ikc3> if 0 then 100 else 101 end
@@ -239,7 +239,7 @@ ikc3> if 0 then 100 else 101 end
## defmodule and def
Example :
-```
+```elixir
ikc3> defmodule Example do
ikc3> def three = 3
ikc3> def double = fn (x) do x * 2 end
@@ -268,7 +268,7 @@ containing facts : triples of subject, predicate, object.
Examples for querying the KC3 database containing all definitions of
the interpreter :
-```
+```elixir
ikc3> Facts.with_tags(Facts.env_facts(), KC3, :operator, ?,
fn (fact) { puts(fact.object); :ok })
operator_eq
diff --git a/doc/index.en.md b/doc/index.en.md
index ecb9364..d4a8616 100644
--- a/doc/index.en.md
+++ b/doc/index.en.md
@@ -5,6 +5,8 @@ The KC3 programming language documentation.
## Index
-[KC3](1_KC3/) core language.
+[1 KC3](1_KC3/) core language.
-[HTTPd](2_HTTPd/) web server.
+[2 HTTPd](2_HTTPd/) web server.
+
+[3 Guides](3_Guides/) about KC3.