1 | import type { Fn } from "./fn.js";
|
2 | /**
|
3 | * A key-value pair / tuple.
|
4 | */
|
5 | export type Pair<K, V> = [K, V];
|
6 | /**
|
7 | * @param K - key type
|
8 | * @param V - value type
|
9 | * @param T - return type
|
10 | */
|
11 | export interface IAssoc<K, V, T> {
|
12 | assoc(key: K, val: V): T;
|
13 | update(key: K, f: Fn<V, V>): T;
|
14 | }
|
15 | /**
|
16 | * @param K - key type
|
17 | * @param V - value type
|
18 | * @param T - return type
|
19 | */
|
20 | export interface IAssocIn<K, V, T> {
|
21 | assocIn(key: K[], val: V): T;
|
22 | updateIn(key: K[], f: Fn<V, V>): T;
|
23 | }
|
24 | //# sourceMappingURL=assoc.d.ts.map |
\ | No newline at end of file |