or download this
# we now know what row should go where, so build and return the mapp
+ed result
my @invmap = sort { $bitmap[$a] <=> $bitmap[$b] } 0 .. $dim - 1;
...
push @vmap, map $_ + $mapped, @vmap;
}
return ($bitmap[$height], [ @$args[ @vmap ] ]);