Skip to content

chetbox/clj-trie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clj-trie

A Clojure library designed to for prefix-matching strings, but will work with other sequences too.

Build status

Usage

(require '[clj-trie.core :as tr])

(def my-trie (atom (tr/trie ["apple" "apples" "banana"])))

(tr/prefix-matches @my-trie "ap")
; => ("apple" "apples")

(tr/prefix-matches @my-trie "ba")
; => ("banana")

(swap! my-trie tr/insert-value "bananas")

(tr/prefix-matches @my-trie "ba")
; => ("banana" "bananas")

License

Copyright © 2015 github.com/chetbox

Licensed under the Apache License, Version 2.0.

About

A simple Clojure trie implementation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published