/** * Updates the value of the specified key within the `HashMap` if it exists. * * @tsplus static HashMap.Aspects update * @tsplus pipeable HashMap update */ export function update(key: K, f: (v: V) => V) { return (self: HashMap): HashMap => self.modify(key, (maybe) => maybe.map(f)) }