ChaiScript/unittests/ranged_for_2.chai
2018-05-29 08:03:59 -06:00

13 lines
257 B
ChaiScript

def keys(map)
{
auto v = Vector(); // create empty vector
for( i : map )
{
v.push_back(i.first); // append key to the vector
}
v; // return the new vector
}
print(keys(["1a":111, "2b":222]));