aboutsummaryrefslogtreecommitdiffstats
path: root/examples/purity-test.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/purity-test.lisp')
-rw-r--r--examples/purity-test.lisp20
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/purity-test.lisp b/examples/purity-test.lisp
new file mode 100644
index 0000000..31e82d3
--- /dev/null
+++ b/examples/purity-test.lisp
@@ -0,0 +1,20 @@
+(let! f (\[x] x))
+(f 10)
+
+(let! g! (\![x] (print! x)))
+(g! "foo")
+
+(let! h (\[x] (g! x)))
+(h "bar")
+
+(let! main! (\![]
+ (print! (fmt "{0}\n" ["main"]))
+ ))
+
+(main!)
+
+(let! pure-main (\[]
+ (print! (fmt "{0}\n" ["pure-main"]))
+ ))
+
+(pure-main)