Hash literals are built with an h token followed by curly brackets, then a comma-delimited key/value pair list, using a colon between key and value.

h{1: "first", 2: "second"} h{"abc": 123, "def": 789} h{true: 1, false: 7}

Hashes may use strings, numbers, or Booleans for keys. Different key types may be used in the same hash.

As of 0.3.2 alpha, indexing a hash with 1.0 is the same as indexing with 1. (Numbers are simplified for hash keys.)

Number hash keys requiring e-notation are not allowed.

Hashes may contain any other langur data structures, and they may be mixed freely.

Hashes may be appended with the concatenation operator (tilde). Concatenation overwrites values for existing keys in the left operand with values having the same keys in the right operand.

h{1: "first", 2: "second"} ~ h{3: "third", 2: "new second"}

The toHash(), keys(), keyExists(), and map() functions may be useful in dealing with hashes.