diff options
| author | Drahflow <drahflow@gmx.de> | 2013-01-03 22:11:37 +0100 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2013-01-03 22:11:37 +0100 |
| commit | 19d573cf7c6dd729289ef5151f15db51bcc79d91 (patch) | |
| tree | 288980504ab3721cfa7fd0aea59514957c17b45d /compiler/standard.ey | |
| parent | d7d307dc6563fe27bf43cab1e83ac21204fea6c6 (diff) | |
Compiler can now push ints and strings
Diffstat (limited to 'compiler/standard.ey')
| -rw-r--r-- | compiler/standard.ey | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/compiler/standard.ey b/compiler/standard.ey index 0d96431..7df61f3 100644 --- a/compiler/standard.ey +++ b/compiler/standard.ey @@ -7,14 +7,18 @@ } quoted { } { * } ? * } "}_" defq -{ ==f _ ==a len ==l +{ =*f _ =*a len ==l l { - 0 a * - 1 l 1 sub range { a * f * } each + 0 a + 1 l 1 sub range { a f } each } { "fold on empty array" die } ? * } /fold deff +{ _ =*a len ==l + [ 1 l range { l -01 sub a } each ] +} /reverse deff + { |or fold } /any deff { |and fold } /all deff @@ -41,4 +45,8 @@ not { "Assertion failure" die } rep } /assert deff +{ ==s + [ s keys { s -01 . } each ] +} /values deff + # vim: syn=elymas |
