cfengine/core — pull request #423 by tzz (2013-03-13 20:07:07+00:00)
Title: Redmine#2272: maparray() function

Please review, the acceptance test inserts an extra `@(test.mapped)` line IIUC, and the code should be checked thoroughly as it is an unholy amalgam of `getindices` and `getvalues` and `maplist`. But I hope the nasty part is done.

Tested by itself like so:

```
body common control
{
bundlesequence => { run };
}

bundle agent run
{
vars:
"todo[1]" string => "2";
"todo[one]" string => "two";
"todo[3999]" slist => { "big", "small" };
"map" slist => maparray("yes $(this.k) $(this.v)", "todo");

reports:
cfengine::
"Hello $(map)";
}
```

produces:

```
R: Hello yes 1 2
R: Hello yes one two
R: Hello yes 3999 big
R: Hello yes 3999 small
```