Maps

  1. mut m := map[string]int{} // Only maps with string keys are allowed for now
  2. m['one'] = 1
  3. println(m['one']) // ==> "1"
  4. println(m['bad_key']) // ==> "0"
  5. // TODO: implement a way to check if the key exists
  6. numbers := { // TODO: this syntax is not implemented yet
  7. 'one': 1,
  8. 'two': 2,
  9. }