From 74f1d02a2f16da9e2ce2fb747dad07979a9db26a Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 29 Nov 2014 02:29:56 -0400 Subject: + Added simple let expressions. (No destructuring of tuples/records yet) + Added records and simple operations on them (get, set & remove). --- src/example/test1.lang | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/example') 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) -- cgit v1.2.3