Last active
August 29, 2015 14:01
-
-
Save aamedina/f9c19bddca475262904f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (def table | |
| (-> (.getDeclaredField clojure.lang.Keyword "table") | |
| (doto (.setAccessible true)) | |
| (.get nil))) | |
| (defn candidates | |
| [prefix] | |
| (when (= (first prefix) \:) | |
| (for [[kw _] table | |
| :let [kw-name (name kw)] | |
| :when (.startsWith kw-name (subs prefix 1))] | |
| (str ":" kw-name)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment