(self: HashMap<K, Option.Option<A>>)
| 1251 | |
| 1252 | /** @internal */ |
| 1253 | export const compact = <K, A>(self: HashMap<K, Option.Option<A>>): HashMap<K, A> => { |
| 1254 | let result = empty<K, A>() |
| 1255 | for (const [key, value] of self) { |
| 1256 | if (Option.isSome(value)) { |
| 1257 | result = set(result, key, value.value) |
| 1258 | } |
| 1259 | } |
| 1260 | return result |
| 1261 | } |
| 1262 | |
| 1263 | /** @internal */ |
| 1264 | export const filterMap = dual< |