From f8a4a457cdf2d2ccd69260ce19f2cda0490e73fb Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 10 Sep 2016 11:43:00 -0700 Subject: 3318 Describe immutability checks in the Readme. --- html/immutable-error.mu.html | 47 +++++++++++++++++++++++++++++++++++++++++++ html/immutable-error.png | Bin 0 -> 28154 bytes html/mutable.mu.html | 47 +++++++++++++++++++++++++++++++++++++++++++ html/mutable.png | Bin 0 -> 10501 bytes 4 files changed, 94 insertions(+) create mode 100644 html/immutable-error.mu.html create mode 100644 html/immutable-error.png create mode 100644 html/mutable.mu.html create mode 100644 html/mutable.png (limited to 'html') diff --git a/html/immutable-error.mu.html b/html/immutable-error.mu.html new file mode 100644 index 00000000..52c661c5 --- /dev/null +++ b/html/immutable-error.mu.html @@ -0,0 +1,47 @@ + + + + +Mu - immutable-error.mu + + + + + + + + + + +
+# compare mutable.mu
+
+def main [
+  local-scope
+  x:address:number <- new number:type
+  foo x
+]
+
+def foo x:address:number [
+  local-scope
+  load-ingredients
+  *x <- copy 34  # will cause an error because x is immutable in this function
+]
+
+ + + diff --git a/html/immutable-error.png b/html/immutable-error.png new file mode 100644 index 00000000..b48fae69 Binary files /dev/null and b/html/immutable-error.png differ diff --git a/html/mutable.mu.html b/html/mutable.mu.html new file mode 100644 index 00000000..f4cb97b6 --- /dev/null +++ b/html/mutable.mu.html @@ -0,0 +1,47 @@ + + + + +Mu - mutable.mu + + + + + + + + + + +
+# compare immutable-error.mu
+
+def main [
+  local-scope
+  x:address:number <- new number:type
+  foo x
+]
+
+def foo x:address:number -> x:address:number [
+  local-scope
+  load-ingredients
+  *x <- copy 34
+]
+
+ + + diff --git a/html/mutable.png b/html/mutable.png new file mode 100644 index 00000000..d2f47ebc Binary files /dev/null and b/html/mutable.png differ -- cgit 1.4.1-2-gfad0