Skip to content

Instantly share code, notes, and snippets.

View Fedreg's full-sized avatar

Fed Reggiardo Fedreg

View GitHub Profile
@Fedreg
Fedreg / hacky-trie.clj
Created July 14, 2019 16:11
Quick and dirty Trie experiment in Clojure
(use 'clojure.test)
(def trie (atom {}))
(defn in-trie? [a k]
(let [key-chars (mapv str (name k))
xs (first key-chars)
ys (rest key-chars)]
(cond
(and (not-empty ys)