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
| Logged out* | |
| Enter Phone Number -> Try Send SMS | |
| Logged in | |
| Sign out -> Logged out | |
| Debt | |
| Create Debt | |
| Debt Details Input | |
| Check Borrower Phone Number -> Try Send SMS | |
| Borrower Confirm Debt Page |
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
| asfdasdadada | |
| das | |
| das | |
| da | |
| sda | |
| da | |
| sd | |
| asd | |
| a |
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
| (ns maps.core) | |
| ;; In Clojure you can fetch items from a map three different ways. Which should | |
| ;; you use when? | |
| (= "bar" ({:foo "bar"} :foo)) ; map as function | |
| (= "bar" (:foo {:foo "bar"})) ; key as function | |
| (= "bar" (get {:foo "bar"} :foo)) ; `get` as function | |
| ;; <INCIDENTALLY> |
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
| (ns pneumatic-tubes.core | |
| (:require-macros [cljs.core.async.macros :refer [go-loop]]) | |
| (:require [cljs.core.async :refer [close! chan <! put!]] | |
| [clojure.string :as str] | |
| [cognitect.transit :as t])) | |
| (def ^:private instances (atom {})) | |
| (def r (t/reader :json)) | |
| (def w (t/writer :json)) |