Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
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
-- v5 | |
----------------------------------------------------------- basic instance info | |
-- show db version | |
SELECT version(); | |
-- uptime | |
SELECT pg_postmaster_start_time(); | |
-- show connections |
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
;; Eclipse Public License 1.0 http://opensource.org/licenses/eclipse-1.0.php | |
(defn make-wrapped-component | |
"Wrap a React component in such a way that the raw JS component is accessible. | |
Useful for for calling methods on the native React component." | |
[component] | |
(fn [attrs & children] | |
(r/create-class | |
{:component-did-mount | |
(fn [this] |