aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2013-03-03 15:57:12 +0100
committerDrahflow <drahflow@gmx.de>2013-03-03 15:57:12 +0100
commit0e1adc46b324f108d0caaa4cd977ad1043ff3fe2 (patch)
treea3d48da91571c9f87ed355bf02f33fcb06c9bdff
parent12d0948fa89e55b6a9460cf676ea73fc7851ab91 (diff)
LISP style conds
-rw-r--r--compiler/standard.ey7
l---------examples/working-compiler/arrays.test1
2 files changed, 8 insertions, 0 deletions
diff --git a/compiler/standard.ey b/compiler/standard.ey
index b294da8..71d4616 100644
--- a/compiler/standard.ey
+++ b/compiler/standard.ey
@@ -49,4 +49,11 @@
[ s keys { s -01 . } each ]
} /values deff
+{ _ =*conds len ==max
+ 0 ==i { i max lt } {
+ i conds { i 1 add conds * max =i } { } ? *
+ i 2 add =i
+ } loop
+} /conds deff
+
# vim: syn=elymas
diff --git a/examples/working-compiler/arrays.test b/examples/working-compiler/arrays.test
new file mode 120000
index 0000000..1d39fd2
--- /dev/null
+++ b/examples/working-compiler/arrays.test
@@ -0,0 +1 @@
+../working/arrays.ey \ No newline at end of file