Created
December 18, 2018 01:25
-
-
Save agumonkey/c6e6a62f92f6f9f01aa8201b7f227cd0 to your computer and use it in GitHub Desktop.
bad helper to show a simpler table of object field members
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
(require '[clojure.reflect :as re] | |
'[clojure.pprint :as pp]) | |
(defn j [& l] | |
"blend of juxt and zip . identity" | |
(fn [o] | |
(let [v ((apply juxt l) o)] | |
(map vector l v)))) | |
(def u (java.net.URL. "https://www.google.com")) | |
(->> u | |
re/reflect | |
:members | |
(map (j :name :parameter-types :return-type)) | |
(map #(into {} %)) | |
pp/print-table) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment