Maps

This chapter describes patterns that can be used to work with maps. Maps allow for an association between one fragment and another, similarly to how a dictionary associates a word with a definition.

Cartographer's Delusion



-> {Any: Any}

Creates a new empty map.

Charting Stratagem



{Any: Any}, (Any, Any)... -> {Any: Any}

Inserts key-value pairs into the given map.

Navigator's Distortion



{Any: Any}, Any -> Any | Void

If there is a value associated with the given fragment, returns it. Otherwise, returns void.

Admiral's Stratagem



{Any: Any}... | [{Any: Any}] -> {Any: Any}

Combines many maps into one. Duplicate entries are prioritized by input index.

Stratagem of Annulment



{Any: Any}, Any... | [Any] -> {Any: Any}

Removes entries from the given map which have any of the given keys.