Help for this page

Select Code to Download


  1. or download this
    sub f {
    $h{$_}||=[]for map@$_,%h=@_;sub x{my$x=1;$x+=x($_)for@{@h{@_}||[]};$x}
    +sort{x($a)<=>x$b}keys%h
    }
    
  2. or download this
    sub f {
      $h{$_}||=[]for map@$_,%h=@_;
      sub x {
    ...
      }
      sort{x($a)<=>x$b}keys%h
    }
    
  3. or download this
      @h{@$_}=@h{@$_}for%h=@_;
  4. or download this
      $x+=x($_)for@{@h{@_}||0};
  5. or download this
      sub x {
        1,map{x($_)}@{@h{@_}||0}
      }
    
  6. or download this
    @h{@$_}=@h{@$_}for%h=@_;sub x{1,map{x($_)}@{@h{@_}||0}}sort{x($a)<=>x$b}keys%h