Help language development. Donate to The Perl Foundation

AVL-Tree cpan:TBROWDER last updated on 2019-11-14


Build Status


This implementation of an AVL Tree has been uploaded to

It was initially a translation of the Java version on Rosetta Code. In addition to the translated code, other public methods have been added as shown by the asterisk in the following list of all public methods:


See the example in the Github repository and on Rosetta Code.

#!/usr/bin/env perl6

use AVL-Tree;
# ...create a tree and some nodes...
my $tree =;
$tree.insert: 1;
$tree.insert: 2, :data\<some important tidbit of knowledge\>;
$my $n = $tree.find: 2;
say $;
some importatant tidbit of knowledge

See the internal documentation in the terminal window by entering:

$ p6doc AVL-Tree


Thanks for help from IRC #raku friends:


Tom Browder, <[email protected]>


Copyright (c) 2019 Tom Browder, all rights reserved.

This program is free software; you can redistribute it or modify it under the same terms as Perl 6 itself.

See that license here.