fork download
  1. int main() {
  2. multiset m = (< 1, 2, 3, 3, "a", "b", "b" >);
  3.  
  4. m["c"] = 55;
  5. m[3] = false;
  6.  
  7. foreach (m; mixed k; mixed n) {
  8. write("%O: %O\n", k, m[n]);
  9. }
  10. }
Success #stdin #stdout 0.05s 8744KB
stdin
Standard input is empty
stdout
1: 1
2: 1
3: 1
"a": 1
"b": 1
"b": 1
"c": 1