Module prelude/Map.js

An implementation of maps from keys to values using the key's Ord instance.

Example

import * as PMap from "prelude/Map.js"
import * as Prelude from "prelude"

let pmap : PMap.Map<Prelude.Text, Prelude.Text> = new PMap.Map();
PMap.insert(Prelude.ordText, "a", "b", pmap)
PMap.lookup(Prelude.ordText, "a", pmap) // returns `Just "b"`

PMap.insert(Prelude.ordText, "a", "c", pmap)
PMap.lookup(Prelude.ordText, "a", pmap) // returns `Just "c"`

PMap.remove(Prelude.ordText, "a", pmap)
PMap.lookup(Prelude.ordText, "a", pmap) // returns `Nothing`

Index

Classes

Functions

Generated using TypeDoc