Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fun/map.ts

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
import * as fun from "https://deno.land/x/fun@v2.0.0/map.ts";

This file contains the ReadonlyMap algebraic data type. ReadonlyMap is a built in data structure in javascript that allows the association of arbitrary key anv value pairs. Generally, keys in a ReadonlyMap are only equal if their memory addresses are equal. This means that while strings and numbers work as expected as keys, complex objects such as [1] or { one: 1 } do not. Thus, there are many utility functions in this file that allow one to specify how to determine equality for keys in a ReadonlyMap.