Table of contents


URI (type alias)

Signature

export type URI = typeof URI

Added in v2.0.0

URI (constant)

Signature

export const URI: "Map" = ...

Added in v2.0.0

empty (constant)

Signature

export const empty: Map<never, never> = ...

Added in v2.0.0

map_ (constant)

Signature

export const map_: Filterable2<URI> = ...

Added in v2.0.0

collect (function)

Signature

export function collect<K>(O: Ord<K>): <A, B>(f: (k: K, a: A) => B) => (m: Map<K, A>) => Array<B> { ... }

Added in v2.0.0

deleteAt (function)

Delete a key and value from a map

Signature

export function deleteAt<K>(E: Eq<K>): (k: K) => <A>(m: Map<K, A>) => Map<K, A> { ... }

Added in v2.0.0

elem (function)

Test whether or not a value is a member of a map

Signature

export function elem<A>(E: Eq<A>): <K>(a: A, m: Map<K, A>) => boolean { ... }

Added in v2.0.0

fromFoldable (function)

Create a map from a foldable collection of key/value pairs, using the specified Magma to combine values for duplicate keys.

Signature

export function fromFoldable<F extends URIS3, K, A>(
  E: Eq<K>,
  M: Magma<A>,
  F: Foldable3<F>
): <R, E>(fka: Kind3<F, R, E, [K, A]>) => Map<K, A>
export function fromFoldable<F extends URIS2, K, A>(
  E: Eq<K>,
  M: Magma<A>,
  F: Foldable2<F>
): <E>(fka: Kind2<F, E, [K, A]>) => Map<K, A>
export function fromFoldable<F extends URIS, K, A>(
  E: Eq<K>,
  M: Magma<A>,
  F: Foldable1<F>
): (fka: Kind<F, [K, A]>) => Map<K, A>
export function fromFoldable<F, K, A>(E: Eq<K>, M: Magma<A>, F: Foldable<F>): (fka: HKT<F, [K, A]>) => Map<K, A> { ... }

Added in v2.0.0

getEq (function)

Signature

export function getEq<K, A>(SK: Eq<K>, SA: Eq<A>): Eq<Map<K, A>> { ... }

Added in v2.0.0

getFilterableWithIndex (function)

Signature

export function getFilterableWithIndex<K = never>(): FilterableWithIndex2C<URI, K, K> { ... }

Added in v2.0.0

getMonoid (function)

Gets Monoid instance for Maps given Semigroup instance for their values

Signature

export function getMonoid<K, A>(SK: Eq<K>, SA: Semigroup<A>): Monoid<Map<K, A>> { ... }

Added in v2.0.0

getShow (function)

Signature

export function getShow<K, A>(SK: Show<K>, SA: Show<A>): Show<Map<K, A>> { ... }

Added in v2.0.0

getWitherable (function)

Signature

export function getWitherable<K>(O: Ord<K>): Witherable2C<URI, K> & TraversableWithIndex2C<URI, K, K> { ... }

Added in v2.0.0

insertAt (function)

Insert or replace a key/value pair in a map

Signature

export function insertAt<K>(E: Eq<K>): <A>(k: K, a: A) => (m: Map<K, A>) => Map<K, A> { ... }

Added in v2.0.0

isEmpty (function)

Test whether or not a map is empty

Signature

export function isEmpty<K, A>(d: Map<K, A>): boolean { ... }

Added in v2.0.0

isSubmap (function)

Test whether or not one Map contains all of the keys and values contained in another Map

Signature

export function isSubmap<K, A>(SK: Eq<K>, SA: Eq<A>): (d1: Map<K, A>, d2: Map<K, A>) => boolean { ... }

Added in v2.0.0

keys (function)

Get a sorted array of the keys contained in a map

Signature

export function keys<K>(O: Ord<K>): <A>(m: Map<K, A>) => Array<K> { ... }

Added in v2.0.0

lookup (function)

Lookup the value for a key in a Map.

Signature

export function lookup<K>(E: Eq<K>): <A>(k: K, m: Map<K, A>) => Option<A> { ... }

Added in v2.0.0

lookupWithKey (function)

Lookup the value for a key in a Map. If the result is a Some, the existing key is also returned.

Signature

export function lookupWithKey<K>(E: Eq<K>): <A>(k: K, m: Map<K, A>) => Option<[K, A]> { ... }

Added in v2.0.0

member (function)

Test whether or not a key exists in a map

Signature

export function member<K>(E: Eq<K>): <A>(k: K, m: Map<K, A>) => boolean { ... }

Added in v2.0.0

modifyAt (function)

Signature

export function modifyAt<K>(E: Eq<K>): <A>(k: K, f: (a: A) => A) => (m: Map<K, A>) => Option<Map<K, A>> { ... }

Added in v2.0.0

pop (function)

Delete a key and value from a map, returning the value as well as the subsequent map

Signature

export function pop<K>(E: Eq<K>): (k: K) => <A>(m: Map<K, A>) => Option<[A, Map<K, A>]> { ... }

Added in v2.0.0

singleton (function)

Create a map with one key/value pair

Signature

export function singleton<K, A>(k: K, a: A): Map<K, A> { ... }

Added in v2.0.0

size (function)

Calculate the number of key/value pairs in a map

Signature

export function size<K, A>(d: Map<K, A>): number { ... }

Added in v2.0.0

toArray (function)

Get a sorted of the key/value pairs contained in a map

Signature

export function toArray<K>(O: Ord<K>): <A>(m: Map<K, A>) => Array<[K, A]> { ... }

Added in v2.0.0

toUnfoldable (function)

Unfolds a map into a list of key/value pairs

Signature

export function toUnfoldable<K, F extends URIS>(O: Ord<K>, U: Unfoldable1<F>): <A>(d: Map<K, A>) => Kind<F, [K, A]>
export function toUnfoldable<K, F>(O: Ord<K>, U: Unfoldable<F>): <A>(d: Map<K, A>) => HKT<F, [K, A]> { ... }

Added in v2.0.0

updateAt (function)

Signature

export function updateAt<K>(E: Eq<K>): <A>(k: K, a: A) => (m: Map<K, A>) => Option<Map<K, A>> { ... }

Added in v2.0.0

values (function)

Get a sorted array of the values contained in a map

Signature

export function values<A>(O: Ord<A>): <K>(m: Map<K, A>) => Array<A> { ... }

Added in v2.0.0

compact (export)

Signature

<E, A>(fa: Map<E, Option<A>>) => Map<E, A>

Added in v2.0.0

filter (export)

Signature

{ <A, B>(refinement: Refinement<A, B>): <E>(fa: Map<E, A>) => Map<E, B>; <A>(predicate: Predicate<A>): <E>(fa: Map<E, A>) => Map<E, A>; }

Added in v2.0.0

filterMap (export)

Signature

<A, B>(f: (a: A) => Option<B>) => <E>(fa: Map<E, A>) => Map<E, B>

Added in v2.0.0

map (export)

Signature

<A, B>(f: (a: A) => B) => <E>(fa: Map<E, A>) => Map<E, B>

Added in v2.0.0

partition (export)

Signature

{ <A, B>(refinement: Refinement<A, B>): <E>(fa: Map<E, A>) => Separated<Map<E, A>, Map<E, B>>; <A>(predicate: Predicate<A>): <E>(fa: Map<E, A>) => Separated<Map<E, A>, Map<E, A>>; }

Added in v2.0.0

partitionMap (export)

Signature

<A, B, C>(f: (a: A) => Either<B, C>) => <E>(fa: Map<E, A>) => Separated<Map<E, B>, Map<E, C>>

Added in v2.0.0

separate (export)

Signature

<E, A, B>(fa: Map<E, Either<A, B>>) => Separated<Map<E, A>, Map<E, B>>

Added in v2.0.0