Trie

A Trie implementation

Trie

A pure perl6 implementation of the trie data structure.

SYNOPSIS

use Trie;
my Trie $t .= new;

$t.insert: $_ for <ability able about above accept according account>;
$t.insert: "agent", {complex => "data"};

say $t.get-all:    "ab";     # (ability able about above)
say $t.get-all:    "abov";   # (above)
say $t.get-single: "abov";   # "above"
#   $t.get-single: "ab";     # dies

say $t.get-single: "agent";  # {complex => "data"}

$t<all>   = 1;
$t<allow> = 2;
say $t<all>;                 # (1 2)

say $t[0];                   # ability
say $t[0 .. 3];              # (ability able about above)

say $t.find-substring: "cc"; # (accept according account)
say $t.find-fuzzy:     "ao"; # set(2 about above according account)

DESCRIPTION

Trie is a pure perl6 implementation of the trie data structure.

AUTHOR

Fernando Correa de Oliveira [email protected]

COPYRIGHT AND LICENSE

Copyright 2018 Fernando Correa de Oliveira

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

Trie v0.0.1

A Trie implementation

Authors

  • Fernando Correa de Oliveira

License

Artistic-2.0

Dependencies

OrderedHash

Test Dependencies

Provides

  • Trie
  • X::Trie::MultipleValues

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.