Last active
August 29, 2015 14:10
-
-
Save capitancook/7861920eb52e5dd7f43a to your computer and use it in GitHub Desktop.
show the hierarchy :cof for a given frame f - published in the post http://highorderdysfunctions.blogspot.com
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
(defn showcofs | |
"show the hierarchy :cof for a given frame f" | |
[f] | |
(let [cofs (fget f :cof :value) cofslist (#(if-not (seq? %)(list %) %) cofs)] ;1 | |
(if (nil? cofs) | |
(vector f) ;2 | |
(reduce #( conj %1 ((if-let [showproc (fget-ii %2 :showcofs :proc)] (eval showproc) (vector %2)) %2)) (vector f) cofslist)))) ;3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment