RosettaCodeData/Task/Associative-array-Iteration/Elena/associative-array-iteration.elena

19 lines
383 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
import system'collections;
import system'routines;
import extensions;
2026-02-01 16:33:20 -08:00
public Program()
2023-07-01 11:58:00 -04:00
{
// 1. Create
auto map := new Map<string,string>();
map["key"] := "foox";
map["key"] := "foo";
map["key2"]:= "foo2";
map["key3"]:= "foo3";
map["key4"]:= "foo4";
// Enumerate
map.forEach:
(tuple){ console.printLine(tuple.Item1," : ",tuple.Item2) }
}