FunctionalPerl

 view release on metacpan or  search on metacpan

lib/FP/Trie.pm  view on Meta::CPAN

                $t2->skip($l2, $maybe_lvl, $maybe_r_lvl)
            } else {

                # no value for the full key; $t is the last seen
                # level, $l the remainder of the key
                ($t, $l, $maybe_lvl, $maybe_r_lvl)
            }
        }
    }

    sub update {
        @_ == 3 or fp_croak_arity 3;
        my ($t, $l, $fn) = @_;
        if ($l->is_null) {
            FP::Trie::ValueLevel->new($$t{sublevels}, &$fn($t->perhaps_value))
        } else {
            my ($a, $l2) = $l->first_and_rest;
            $t->sublevels_update(
                sub {
                    hash_update $_[0], $a, sub {
                        do {



( run in 0.318 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )