Created
December 9, 2014 14:22
-
-
Save kremers/4d72fb02a05ad54081be to your computer and use it in GitHub Desktop.
This file contains 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 input '([:h1 "test1.1"] [:h2 "test2.1"] [:h3 "test3.1"] | |
[:h3 "test3.2"] [:h3 "test3.3"] [:h2 "test2.2"])) | |
(def output '([:ol | |
[:h1 "test1.1"] | |
[:ol | |
[:h2 "test2.1"] | |
[:ol | |
[:h3 "test3.1"] | |
[:h3 "test3.2"] | |
[:h3 "test3.3"]] | |
[:h2 "test2.2"]]])) | |
(comment ideas:) | |
(def _h [:h1 :h2 :h3 :h4 :h5 :h6]) | |
(defn compare_index [cmp i1 i2] (cmp (.indexOf _h i1) (.indexOf _h i2))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment