/** * Maps over the values of the `HashMap` using the specified partial function * and filters out `None` values. * * @tsplus static HashMap.Aspects collect * @tsplus pipeable HashMap collect */ export function collect(f: (a: A) => Maybe) { return (self: HashMap): HashMap => self.collectWithIndex((_, a) => f(a)) }