Skip to content

diminishedprime/anagrams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live Demo

There is a Live Demo available. The demo powered by the KLIPSE project.

anagrams

anagrams is a simple clojure library designed to give you anagrams for a word, provided you give it a dictionary of words to choose from.

Usage

  1. First, add anagrams to your dependencies. https://img.shields.io/clojars/v/anagrams.svg
  2. Then, require anagrams into your namespace.
    (ns your-namespace
      (:require [anagrams.core :as anagrams]))
    
    ;; Set the word list to be used to find anagrams.
    (anagrams/set-word-list! "newline\ndelimeted\nword\nlist") ;; => "done"
    
    ;; To find anagrams
    (anagrams/anagrams-of "newline") ;; => #{"newline"}
    
    ;; To append more words to the dictionary
    (anagrams/append-word-list! "more\nawesome\nwords") ;; => "done"
    
    (anagrams/anagrams-of "rome");; => #{"more"}
        

License

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.