(rontolisp) docs
← Maps, sets and vectors

get

(get m k) / (get m k default)

Answers the value under k: in a map or set (the member itself), the element at index k of a vector or character of a string, default (nil without one) when missing. Reads nil too; a list answers the default. A record reads through its entry table; a deftype or reify answers the default, like the oracle. The same read backs keyword call position (:k m).

As a value the two- or three-argument read.

Keys compare by =, so a vector, list, map or set key finds an equal one. A Java Map looks k up itself, by equals; a key no Java method takes (a keyword, a symbol, a map, a set) is in no Java map, and any other Java object answers the default, like the oracle.