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
javascript_oo.html |
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
{"field":"value"} |
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
(deftest coll-preds-test | |
(let [preds ['coll? 'vector? 'map? 'list? 'seq? 'seqable? 'sequential?] | |
exprs {"01 \"string\"" "string" | |
"02 []" [] | |
"03 {}" {} | |
"04 '(number? 1)" '(number? 1) | |
"05 `(number? 1)" `(number? 1) | |
"06 `#(identity %)" `#(identity %) | |
"07 '#(identity %)" '#(identity %) | |
"08 `(fn [])" `(fn []) |
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
(ns core | |
(:require [clojure.spec :as sp])) | |
(sp/def ::backslash #(= % \\)) | |
(sp/def ::quote #(= % \")) | |
;; \" ... \\ \" is invalid string *body* and it's better to | |
;; aggressively terminate as early as possible there is more than one | |
;; way to define (resp. catch) (in)valid string! |