diff options
| author | Drahflow <drahflow@gmx.de> | 2014-08-07 16:37:58 +0200 |
|---|---|---|
| committer | Drahflow <drahflow@gmx.de> | 2014-08-07 16:37:58 +0200 |
| commit | 850c84edb1744eb960891c3b3a48776e8acc1948 (patch) | |
| tree | a3387f0bad24a8a31732662cfb7848b8e69d0660 | |
| parent | 35700489313e5c14d52e42cd09b1bf8ea9100013 (diff) | |
Added unvectorized list append
| -rw-r--r-- | elymas/lib/list.ey | 6 | ||||
| -rw-r--r-- | examples/working-loaded/list.test | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/elymas/lib/list.ey b/elymas/lib/list.ey index df5ba1c..38af5ac 100644 --- a/elymas/lib/list.ey +++ b/elymas/lib/list.ey @@ -49,7 +49,7 @@ { } "#itrans" deffd { 1 add } "#istep" deffd - { { ==l [ -01 NONE ] + { ==l [ -01 NONE ] l .len { _ 1 l .end =[] } { @@ -57,7 +57,9 @@ } ? * l .setEnd l .len 1 add l .setLen - }_ [ 0 ] [ ] '' * } /append defmd + } /append1 defmd + + { { .append1 }_ [ 0 ] [ ] '' * } /append defmd { < 0 ==len { =len } =*setLen diff --git a/examples/working-loaded/list.test b/examples/working-loaded/list.test index 7ac2e05..2d07e50 100644 --- a/examples/working-loaded/list.test +++ b/examples/working-loaded/list.test @@ -14,6 +14,10 @@ m len dump 2 m * dump +[ /a /b /c ] m .append1 + +m { dump } each + list _ [ 1 2 3 ] -01 .append list _ [ 3 4 5 ] -01 .append add ==a |
