14 lines
367 B
Text
14 lines
367 B
Text
bundle agent __main__
|
|
{
|
|
vars:
|
|
"strings" slist => { "abcd", "123456789", "abcdef", "1234567" };
|
|
|
|
"sorted[$(with)]"
|
|
string => "$(strings)",
|
|
with => string_length( "$(strings)" );
|
|
|
|
"sort_idx" slist => reverse( sort( getindices( "sorted" ), lex ) );
|
|
|
|
reports:
|
|
"'$(sorted[$(sort_idx)])' is $(sort_idx) characters in length.";
|
|
}
|