Commit 2d58024784656bf4d3cfdd948169a9987d78f371

Thomas de Grivel 2024-04-09T09:21:52

readme

diff --git a/.ic3_history b/.ic3_history
index f2d4f6f..511cba2 100644
--- a/.ic3_history
+++ b/.ic3_history
@@ -1,11 +1,3 @@
-def fib = fn { (0) { 1 } (1) { 1 } (x) { if x < 0 then 1 else fib(x - 2) + fib(x - 1) end } }
-def fib = fn (x) { if x < 0 then 1 else fib(x - 2) + fib(x - 1) end }
-def fib = fn (x) { if x < 0 then
-1
-else
-fib(x - 2) + fib(x - 1)
-end
-}
 if true then 1 else 2 end
 if true 1 else 2 end
 def fib = fn (x) { if x < 0 1 else fib(x - 2) + fib(x - 1) end }
@@ -97,3 +89,11 @@ def List.last = fn (x) do
   y
 end
 List.last([1, 2, 3, 4])
+[x, y | z] = List.reverse([1, 2, 3])
+x
+y
+z
+[x, y | z] = List.reverse([1, 2, 3, 4])
+x
+y
+z
diff --git a/README.md b/README.md
index 7673165..5736b0b 100644
--- a/README.md
+++ b/README.md
@@ -362,6 +362,18 @@ matched to litterals that show their type to the programmer. This is
 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 :
+```
+ic3> [x, y | z] = List.reverse([1, 2, 3, 4])
+[4, 3, 2, 1]
+ic3> x
+4
+ic3> y
+3
+ic3> z
+[2, 1]
+```
+
 
 #### Macros