@@ -122,6 +122,27 @@ export function choose<Key, T, U>(a: any, b?: any): any {
122
122
return partial ? exec : exec ( a )
123
123
}
124
124
125
+ /**
126
+ * Wraps the two given maps as a single concatenated map.
127
+ * @param second The second map.
128
+ * @param first The first map.
129
+ */
130
+ export function append < Key , T > ( second : Map < Key , T > ) : ( first : Map < Key , T > ) => Map < Key , T >
131
+ /**
132
+ * Wraps the two given maps as a single concatenated map.
133
+ * @param first The first map.
134
+ * @param second The second map.
135
+ */
136
+ export function append < Key , T > ( first : Map < Key , T > , second : Map < Key , T > ) : Map < Key , T >
137
+ export function append < Key , T > ( a : any , b ?: any ) : any {
138
+ const partial = b === undefined
139
+ const second : Map < Key , T > = partial ? a : b
140
+ function exec ( first : Map < Key , T > ) : Map < Key , T > {
141
+ return new Map < Key , T > ( Iterables . append ( first , second ) )
142
+ }
143
+ return partial ? exec : exec ( a )
144
+ }
145
+
125
146
export function get < Key , T > ( key : Key ) : ( source : Map < Key , T > ) => T
126
147
export function get < Key , T > ( source : Map < Key , T > , key : Key ) : T
127
148
export function get < Key , T > ( a : any , b ?: any ) : any {
0 commit comments