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 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
1 acorn: A Leiningen template for a ClojureScript setup with Figwheel, Austin, Om. | |
8 amp: Leiningen template for AMP (Alfresco Module Package) projects. | |
1 angular-cl2: A Leiningen template for using AngularJS and ChlorineJS | |
1 angular: Clojure and AngularJS in perfect harmony. | |
6 angular: Clojure and AngularJS in perfect harmony. $ lein new angular <name> | |
2 angularjs-app: Leiningen template for web application with http-kit and angularjs | |
5 angular-simple: Clojure and AngularJS $ lein new angular-simple <name> | |
1 aperiodic-cljs: My cljs development starting point. Basically ripped from lein-cljsbuild. | |
1 apijr: clojurescript project template | |
1 appfgo: 'lein new' template for Funcgo application |
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
87 luminus: a template for creating Luminus applications | |
7 mala: A Leiningen template for Mala | |
1 maple: A leinginen template with MPL | |
3 mesos-framework: A template for setting up mesos-frameworks using component. | |
3 mies-brepl: A minimal ClojureScript project template with REPL | |
7 mies-node: A minimal ClojureScript Node.js project template | |
27 mies-om: A minimal Om project template | |
2 mies-weasel: A minimal ClojureScript project template with Weasel REPL, forked from mies. | |
40 mies: A minimal ClojureScript project template | |
3 mies: FIXME: write description |
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
;; | |
;; Take a textfile which contains a copy of the raw html of a humblebundle user account download | |
;; select the download page html table with the mouse copy+paste in a textfile | |
;; Use this file to create a list of folders based on the download names. | |
;; | |
;; === TEXT FILE CONTENT EXAMPLE === | |
;; Book of Making – Volume 1 | |
;; Raspberry Pi Press | |
;; 49 MB md5 |
Chaining promises in ClojureScript is best done using the thread-first macro, ->
. Here's an example of using the fetch API:
(-> (js/fetch "/data")
(.then (fn [r]
(when-not (.-ok r)
(throw (js/Error. "Could not fetch /data")))
(.json r)))
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
var diacriticsMap = [ | |
{'base':'A', 'letters':/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g}, | |
{'base':'AA','letters':/[\uA732]/g}, | |
{'base':'AE','letters':/[\u00C4\u00C6\u01FC\u01E2]/g}, | |
{'base':'AO','letters':/[\uA734]/g}, | |
{'base':'AU','letters':/[\uA736]/g}, | |
{'base':'AV','letters':/[\uA738\uA73A]/g}, | |
{'base':'AY','letters':/[\uA73C]/g}, | |
{'base':'B', 'letters':/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g}, | |
{'base':'C', 'letters':/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g}, |
OlderNewer