Last active
December 16, 2015 22:29
-
-
Save martintrojer/5507774 to your computer and use it in GitHub Desktop.
col-size
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
(defn size [o] | |
(-> o pr-str count)) | |
(defn col-size [c] | |
(let [s (if (map? c) (seq c) (map-indexed vector c))] | |
(->> s | |
(map (fn [[k v]] [k (size v)])) | |
(sort-by second) | |
reverse))) |
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
(defn third [col] | |
(-> col next next first)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment