sub hmap (&\%) { my( $code, $href ) = @_; map{ local @_; $code->( @_ = each %$href ) } 1 .. keys %$href; }