(rontolisp) docs
← Maps, sets and vectors

replace

(replace smap coll) / (replace smap)

clojure.core/replace: each member of coll that smap holds is replaced by its value there. smap is a map or record (keys compare by =) or a vector (an integer member in range is an index); nil holds nothing, anything else signals. A vector coll answers a vector; anything else answers its seq, lazy for a lazy input and a strict list otherwise (so (replace {} nil) is nil, where the oracle prints ()). (replace smap) is its transducer. As a value one or two arguments.