{
  "title": "Map",
  "level": "Low",
  "elements": [
    {
      "pattern": "",
      "module": "Map",
      "name": "t",
      "type": "type",
      "signature": "type ('a, 'b) t",
      "description": "",
      "examples": []
    },
    {
      "pattern": "Creating a constant map that maps all keys to a single value",
      "module": "Map",
      "name": "const",
      "type": "function",
      "signature": "val const : 'b -> ( _, 'b ) t",
      "description": "",
      "examples": []
    },
    {
      "pattern": "Adding a key-value pair to a map",
      "module": "Map",
      "name": "add",
      "type": "function",
      "signature": "val add : 'a -> 'b -> ( 'a, 'b ) t -> ( 'a, 'b ) t",
      "description": "",
      "examples": []
    },
    {
      "pattern": "Adding a key-value pair to a map",
      "module": "Map",
      "name": "add'",
      "type": "function",
      "signature": "val add' : ( 'a, 'b ) t -> 'a -> 'b -> ( 'a, 'b ) t",
      "description": "",
      "examples": []
    },
    {
      "pattern": "Getting the value associated with a key",
      "module": "Map",
      "name": "get",
      "type": "function",
      "signature": "val get : 'a -> ( 'a, 'b ) t -> 'b",
      "description": "",
      "examples": []
    },
    {
      "pattern": "Getting the value associated with a key",
      "module": "Map",
      "name": "get'",
      "type": "function",
      "signature": "val get' : ( 'a, 'b ) t -> 'a -> 'b",
      "description": "",
      "examples": []
    },
    {
      "pattern": "Returns the default value of the map, i.e., the value returned for keys that are not present in the map.",
      "module": "Map",
      "name": "get_default",
      "type": "function",
      "signature": "val get_default : ( _, 'b ) t -> 'b",
      "description": "",
      "examples": []
    },
    {
      "pattern": "Creating a map from a list of key-value pairs",
      "module": "Map",
      "name": "of_list",
      "type": "function",
      "signature": "val of_list : default:'b -> ('a * 'b) list -> ( 'a, 'b ) t",
      "description": "",
      "examples": []
    }
  ],
  "metadata": {
    "signatures": [
      "type (+'a, 'b) t",
      "val const : 'b -> ( _, 'b ) t",
      "val add : 'a -> 'b -> ( 'a, 'b ) t -> ( 'a, 'b ) t",
      "val add' : ( 'a, 'b ) t -> 'a -> 'b -> ( 'a, 'b ) t",
      "val get : 'a -> ( 'a, 'b ) t -> 'b",
      "val get' : ( 'a, 'b ) t -> 'a -> 'b",
      "val get_default : ( _, 'b ) t -> 'b",
      "val of_list : default:'b -> ('a * 'b) list -> ( 'a, 'b ) t",
      "val filter_map : default:( 'b -> 'c ) -> f:( 'a -> 'b -> 'c option ) -> ( 'a, 'b ) t -> ( 'a, 'c ) t",
      "val for_all : default:( 'b -> bool ) -> f:( 'a -> 'b -> bool ) -> ( 'a, 'b ) t -> bool",
      "val merge : default:( 'b -> 'c -> 'd ) -> f_both:( 'a -> 'b -> 'c -> 'd option ) -> f1:( 'a -> 'b -> 'd option ) -> f2:( 'a -> 'c -> 'd option ) -> ( 'a, 'b ) t -> ( 'a, 'c ) t -> ( 'a, 'd ) t [@@program]",
      "val extract : ( 'a, 'b ) t -> ('a * 'b) list * 'b [@@program]",
      "val pp : 'a printer -> 'b printer -> ( 'a, 'b ) t printer [@@program]"
    ],
    "source": "https://docs.imandra.ai/imandra-docs/odoc/imandra-base/Imandra_prelude/Map/index.html",
    "note": "Functions from `filter_map` to `pp` are not defined in the logic-mode."
  }
}