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