aboutsummaryrefslogtreecommitdiff
path: root/src/example/test1.lang
diff options
context:
space:
mode:
authorEduardo Julian2014-11-29 02:29:56 -0400
committerEduardo Julian2014-11-29 02:29:56 -0400
commit74f1d02a2f16da9e2ce2fb747dad07979a9db26a (patch)
treed710b3178c804a4fe5d4f8cad0903fc787e60710 /src/example/test1.lang
parent71b63cbbb858b85dd4850c4aa174cf7ec509b11c (diff)
+ Added simple let expressions. (No destructuring of tuples/records yet)
+ Added records and simple operations on them (get, set & remove).
Diffstat (limited to 'src/example/test1.lang')
-rw-r--r--src/example/test1.lang12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/example/test1.lang b/src/example/test1.lang
index c5d797beb..8e740eabd 100644
--- a/src/example/test1.lang
+++ b/src/example/test1.lang
@@ -24,3 +24,15 @@
(def pi 3.14)
pi
+
+(def (foo x)
+ (let [y (*' 2 x)]
+ (+' x y)))
+
+(foo 10)
+
+(def bar {#x 10 #y 20})
+bar
+(get@ #x bar)
+(set@ #z 30 bar)
+(remove@ #y bar)