(get: (entry: Request.Entry<A>) => K)
| 303 | }) |
| 304 | |
| 305 | const hashGroupKey = <A, K>(get: (entry: Request.Entry<A>) => K) => { |
| 306 | const groupKeys = MutableHashMap.empty<K, K>() |
| 307 | return (entry: Request.Entry<A>): unknown => { |
| 308 | const key = get(entry) |
| 309 | const okey = MutableHashMap.get(groupKeys, key) |
| 310 | if (okey._tag === "Some") { |
| 311 | return okey.value |
| 312 | } |
| 313 | MutableHashMap.set(groupKeys, key, key) |
| 314 | return key |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | /** |
| 319 | * Constructs a request resolver from a pure function. |
no test coverage detected