Skip to content

Instantly share code, notes, and snippets.

View biomunky's full-sized avatar
💾
Have you tried turning it off and on again?

Dan Klose biomunky

💾
Have you tried turning it off and on again?
View GitHub Profile
@biomunky
biomunky / bog.clj
Created February 29, 2012 14:43
very hacky start to boggle
;;hacky start to boggle
(use '[clojure.java.io :only [reader]]
'[clojure.string :only [lower-case]])
;; -- THE TRIE
(defn add-to-trie [trie x]
(assoc-in trie x (merge (get-in trie x) {:val x :terminal true})))
(defn in-trie? [trie x]