summaryrefslogtreecommitdiff
path: root/hs/notes.txt
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2023-05-21 22:00:40 +0200
committerTom Smeding <tom@tomsmeding.com>2023-05-21 22:00:40 +0200
commit0ef6d707911b3cc57a0bee5db33a444237219c29 (patch)
tree0e0a8572924b5d944c77a32d962131a0fe5cbb75 /hs/notes.txt
parent164a8d297429d58d216b9fa44e0cb42db5d23e2c (diff)
Find old Haskell implementation on backup diskHEADmaster
GHC 8.0.2 vintage, doesn't compile
Diffstat (limited to 'hs/notes.txt')
-rw-r--r--hs/notes.txt47
1 files changed, 47 insertions, 0 deletions
diff --git a/hs/notes.txt b/hs/notes.txt
new file mode 100644
index 0000000..e935e44
--- /dev/null
+++ b/hs/notes.txt
@@ -0,0 +1,47 @@
+// {
+// f := nil;
+// {
+// a := 1;
+// f = ??{
+// print(a);
+// };
+// f(); // print 1
+// a = 3;
+// f(); // print 3
+// };
+// f(); // print 3
+// a := 2;
+// f(); // print 3
+// }; // deref and delete f and a
+// print("done");
+
+
+// -- new snippet
+
+
+// f := ??{
+// print(a); // error: undefined variable 'a'
+// };
+// a := 1;
+// f();
+
+
+// -- new snippet
+
+
+{
+ a := 10; // 1
+ f := nil; // 2
+ {
+ a := 20; // 3
+ f = ??{
+ print(a);
+ g := ??{
+ print(a);
+ };
+ g();
+ };
+ f(); // -> 20 20 NOTE: the g is stored in 5 while 4 is available!
+ };
+ f(); // -> 20 20 of 20 10?
+};