$node->climb_up(sub { my ($node, $return) = @_; if (should_continue($node)) { return; } else { $return->(42); } });