diff --git a/unittests/ranged_for_2.chai b/unittests/ranged_for_2.chai new file mode 100644 index 00000000..b8c208fa --- /dev/null +++ b/unittests/ranged_for_2.chai @@ -0,0 +1,12 @@ +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])); + +