aboutsummaryrefslogtreecommitdiff
path: root/src/example/test1.lang
diff options
context:
space:
mode:
authorEduardo Julian2015-01-03 11:24:14 -0400
committerEduardo Julian2015-01-03 11:24:14 -0400
commit661c70e4d786e7b2188564beddc586f1a50e4656 (patch)
treefe3aff74ffa526d455b7e22d7015573dc926f5f1 /src/example/test1.lang
parent212dd66966a873e3d7183b071f719ef58e4d88fe (diff)
The language officially has a name: Lux (stylized as "lux").
Diffstat (limited to 'src/example/test1.lang')
-rw-r--r--src/example/test1.lang38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/example/test1.lang b/src/example/test1.lang
deleted file mode 100644
index 8e740eabd..000000000
--- a/src/example/test1.lang
+++ /dev/null
@@ -1,38 +0,0 @@
-
-(* 5 6)
-
-## My first function definition!
-(def (repeat n val)
- (if (<=' n 0)
- (#Nil [])
- (#Cons [val (repeat (-' n 1) val)])))
-
-## Testing one, two, three...
-(repeat 5 5)
-
-(def (fold f init inputs)
- (case inputs
- #( Outer comment #( Inner comment )# )#
- (#Nil []) init
- (#Cons [head tail]) (fold f (f init head) tail)))
-
-## It's alive!
-(fold * 1 (repeat 5 5))
-
-3.14
-
-(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)