{"id":347337,"date":"2023-03-27T15:00:58","date_gmt":"2023-03-27T15:00:58","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=347337"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=347337","title":{"rendered":"<span>Clojure \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u044d\u043a\u0441\u043a\u0443\u0440\u0441 \u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 Clojure, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u0435\u043d, \u0447\u0442\u043e \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0440\u0430\u0437\u0434\u0435\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442 (\u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435).<\/p>\n<h3>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438<\/h3>\n<p><code>;;<\/code> \u0434\u0432\u0435 \u0442\u043e\u0447\u043a\u0438 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438, <code>;<\/code> \u043e\u0434\u043d\u0430 \u0442\u043e\u0447\u043a\u0430 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<p><code>#_<\/code> \u043c\u0430\u043a\u0440\u043e\u0441 \u0447\u0442\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u043e\u0440\u043c\u0443<\/p>\n<p><code>(comment )<\/code> \u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043a\u043e \u0432\u0441\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c\u0441\u044f \u0444\u043e\u0440\u043c\u0430\u043c<\/p>\n<h3>Clojure \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u0432 \u0444\u043e\u0440\u043c\u0430\u0445<\/h3>\n<p>Clojure \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0432 &#171;\u0444\u043e\u0440\u043c\u0430\u0445&#187;, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u043f\u0438\u0441\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u0440\u0443\u0433\u043b\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 <code>()<\/code> \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c\u0438.<\/p>\n<p>Clojure \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0444\u043e\u0440\u043c\u0435 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>Clojure \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d \u0432 \u0432\u0438\u0434\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d. \u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0443\u0442\u044c \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u0438 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d.<\/p>\n<pre><code>;; Define the namespace test (ns test.code)  ;; src\/test\/code.clj  ;; Define a longer namespace (ns com.company.product.component.core)  ;; src\/com\/company\/product\/component\/core.clj <\/code><\/pre>\n<h3>\u041c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438<\/h3>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>str<\/code> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u0437 \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/p>\n<pre><code>(str \"Hello\" \" \" \"World\") ; => \"Hello World\"<\/code><\/pre>\n<p><code>clojure.string<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430)<\/p>\n<h3>Math (\u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430), Truth (\u0438\u0441\u0442\u0438\u043d\u0430) \u0438 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u0430\u044f \u043d\u043e\u0442\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u0443\u044e \u043d\u043e\u0442\u0430\u0446\u0438\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0435\u0433\u043a\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438<\/p>\n<pre><code>(+ 1 2 3 5 7 9 12) ; => 40 (- 24 7 3) ; => 14 (* 1 2) ; => 2 (\/ 27 7) ; => 22\/7<\/code><\/pre>\n<p>\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u0447\u0435\u043d\u044c \u0442\u043e\u0447\u0435\u043d, \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 (\u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u0435\u0442)<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u0442\u043e\u0447\u043d\u044b<\/p>\n<pre><code>(+ 1 (- 3 2)) ; = 1 + (3 - 2) => 2<\/code><\/pre>\n<p>\u0420\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u2014 \u044d\u0442\u043e =<\/p>\n<pre><code>(= 1 1) ; => true (= 2 1) ; => false<\/code><\/pre>\n<p><code>;<\/code> \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043b\u043e\u0433\u0438\u043a\u0435 not, \u0442\u0430\u043a\u00a0 <code>(not true) ; => false<\/code><\/p>\n<pre><code>(not= true false) ; => true<\/code><\/pre>\n<h3>\u0422\u0438\u043f\u044b<\/h3>\n<p>Clojure \u0438\u043c\u0435\u0435\u0442 \u0441\u0442\u0440\u043e\u0433\u0443\u044e \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 Clojure \u0432\u0441\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0438\u043f\u043e\u043c.<\/p>\n<p>Clojure \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u0438\u043f. \u0422\u0438\u043f \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u0434\u0435, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u0434 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u043c.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Clojure \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c\u044b\u043c \u043d\u0430 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u044f\u0437\u044b\u043a\u043e\u043c, \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0442\u0438\u043f\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0441\u0440\u0435\u0434\u044b, \u0433\u0434\u0435 \u044d\u0442\u043e \u0443\u043c\u0435\u0441\u0442\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Clojure \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0435 \u0442\u0438\u043f\u044b Java \u0434\u043b\u044f \u0431\u0443\u043b\u0435\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u0442\u0440\u043e\u043a \u0438 \u0447\u0438\u0441\u0435\u043b.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0438\u043f\u0430 \u043a\u043e\u0434\u0430 \u0432 Clojure \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>class<\/code> \u0438\u043b\u0438 <code>type<\/code>.<\/p>\n<pre><code>(class 1) ; Integer literals are java.lang.Long by default (class 1.); Float literals are java.lang.Double (class \"\"); Strings always double-quoted, and are java.lang.String (class false) ; Booleans are java.lang.Boolean (class nil); The \"null\" value is called nil<\/code><\/pre>\n<p>Vectors (\u0432\u0435\u043a\u0442\u043e\u0440\u044b) \u0438 Lists (\u0441\u043f\u0438\u0441\u043a\u0438) \u2014 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u043a\u043b\u0430\u0441\u0441\u044b java!<\/p>\n<pre><code>(class [1 2 3]); => clojure.lang.PersistentVector (class '(1 2 3)); => clojure.lang.PersistentList<\/code><\/pre>\n<h3>\u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Clojure:<\/p>\n<ul>\n<li>\n<p><code>(1 2 \"three\")<\/code> \u0438\u043b\u0438 <code>(list 1 2 \"three\")<\/code> \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 (\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f)<\/p>\n<\/li>\n<li>\n<p><code>[1 2 \"three\"]<\/code> \u0438\u043b\u0438 <code>(list 1 2 \"three\")<\/code> \u2014 \u0432\u0435\u043a\u0442\u043e\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c (\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f)<\/p>\n<\/li>\n<li>\n<p><code>{:key \"value\"}<\/code> \u0438\u043b\u0438 <code>(hash-map :key \"value\")<\/code> \u2014 \u0445\u044d\u0448\u0442\u0430\u0431\u043b\u0438\u0446\u0430 (\u0445\u044d\u0448\u043c\u0430\u043f\u0430) \u0441 \u043d\u0443\u043b\u0435\u043c \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u0430\u0440 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c)<\/p>\n<\/li>\n<li>\n<p><code>#{1 2 \"three\"}<\/code> \u0438\u043b\u0438 <code>(set 1 2 \"three\")<\/code> \u2014 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a <code>()<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430 \u2014 \u0438\u043c\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>'<\/code> quote \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e Clojure, \u0447\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<pre><code>'(1 2 3)<\/code><\/pre>\n<p>\u0421\u043f\u0438\u0441\u043a\u0438 \u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438<\/p>\n<pre><code>(coll? '(1 2 3)) ; => true (coll? [1 2 3]) ; => true<\/code><\/pre>\n<p>\u0422\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u0438\u0441\u043a\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044f\u043c\u0438<\/p>\n<pre><code>(seq? '(1 2 3)) ; => true (seq? [1 2 3]) ; => false<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u2014 \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u0435\u043d\u0438\u0432\u044b\u043c\u0438. &#171;\u041b\u0435\u043d\u0438\u0432\u0430\u044f&#187; \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043a \u043d\u0435\u0439 \u043d\u0435 \u043e\u0431\u0440\u0430\u0442\u044f\u0442\u0441\u044f.<\/p>\n<p>\u041b\u0435\u043d\u0438\u0432\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a:<\/p>\n<pre><code> (range) ; => (0 1 2 3 4 ...) - an infinite series (take 4 (range)) ;  (0 1 2 3) - lazyily evaluate range and stop when enough values are taken<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 cons \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u043b\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430<\/p>\n<pre><code>(cons 4 [1 2 3]) ; => (4 1 2 3) (cons 4 '(1 2 3)) ; => (4 1 2 3)<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 conj, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0438\u043f\u0430 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438, \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u043b\u0438 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0432\u0435\u043a\u0442\u043e\u0440\u0430<\/p>\n<pre><code>(conj [1 2 3] 4) ; => [1 2 3 4] (conj '(1 2 3) 4) ; => (4 1 2 3)<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 concat \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0438\u043b\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u0435<\/p>\n<pre><code>(concat [1 2] '(3 4)) ; => (1 2 3 4)<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 filter, map \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u043c\u0438<\/p>\n<pre><code>(map inc [1 2 3]) ; => (2 3 4) (filter even? [1 2 3]) ; => (2)<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 reduce \u0434\u043b\u044f \u0438\u0445 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f<\/p>\n<pre><code>(reduce + [1 2 3 4]) ; = (+ (+ (+ 1 2) 3) 4) ; => 10<\/code><\/pre>\n<p>Reduce \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/p>\n<pre><code>(reduce conj [] '(3 2 1)) ; => [3 2 1]<\/code><\/pre>\n<p>\u042d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442 <code>(conj (conj (conj (conj [] 3) 2) 1)<\/code><\/p>\n<h3>\u0424\u0443\u043d\u043a\u0446\u0438\u0438<\/h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>fn<\/code> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0445 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. <code>fn<\/code> \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0441\u043b\u0430\u0442\u044c\u0441\u044f, \u0438 \u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0435 \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<pre><code>(fn hello [] \"Hello World\") ; => hello<\/code><\/pre>\n<p>\u041e\u0431\u0435\u0440\u043d\u0438\u0442\u0435 \u0444\u043e\u0440\u043c\u0443 <code>(fn ,,,)<\/code> \u0432 \u043a\u0440\u0443\u0433\u043b\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0435\u0435 \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/p>\n<pre><code>((fn hello [] \"Hello World\")) ; => \"Hello World\"<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>def<\/code>, \u0441\u043e\u0437\u0434\u0430\u0432 \u0438\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 <code>var<\/code>. \u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0432 <code>def<\/code>, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e, \u0430 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043e\u0446\u0435\u043d\u0435\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<\/p>\n<pre><code>(defn hello-world []   \"Hello World\") ;; => \"Hello World\"<\/code><\/pre>\n<p>[] \u2014 \u044d\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<pre><code>(defn hello [name]   (str \"Hello \" name)) (hello \"Steve\") ; => \"Hello Steve\"<\/code><\/pre>\n<p>Clojure \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u0440\u0438\u0430\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043e\u0434\u043d\u043e\u043c\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<pre><code>(defn hello3   ([] \"Hello World\")   ([name] (str \"Hello \" name))) (hello3 \"Jake\") ; => \"Hello Jake\" (hello3) ; => \"Hello World\"<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<pre><code>(defn count-args [&amp; args]   (str \"You passed \" (count args) \" args: \" args)) (count-args 1 2 3) ; => \"You passed 3 args: (1 2 3)\"<\/code><\/pre>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0438 \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b<\/p>\n<pre><code>(defn hello-count [name &amp; args]   (str \"Hello \" name \", you passed \" (count args) \" extra args\")) (hello-count \"Finn\" 1 2 3) ; => \"Hello Finn, you passed 3 extra args\"<\/code><\/pre>\n<h3>\u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0445\u044d\u0448\u043c\u0430\u043f\u043e\u0432 (hash-map)<\/h3>\n<pre><code>(class {:a 1 :b 2 :c 3}) ; => clojure.lang.PersistentArrayMap<\/code><\/pre>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u044b \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0431\u043e\u043d\u0443\u0441\u043e\u043c \u0432 \u043f\u043b\u0430\u043d\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438<\/p>\n<pre><code>(class :a) ; => clojure.lang.Keyword<\/code><\/pre>\n<p>\u041c\u0430\u043f\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u044e\u0447\u0430, \u043d\u043e \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430<\/p>\n<pre><code>(def stringmap (hash-map \"a\" 1, \"b\" 2, \"c\" 3)) stringmap  ; => {\"a\" 1, \"b\" 2, \"c\" 3}  (def keymap (hash-map :a 1 :b 2 :c 3)) keymap ; => {:a 1, :c 3, :b 2} (order is not guaranteed)<\/code><\/pre>\n<p><em>\u0417\u0430\u043f\u044f\u0442\u044b\u0435 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u044b. \u0417\u0430\u043f\u044f\u0442\u044b\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f Clojure-\u0440\u0438\u0434\u0435\u0440\u043e\u043c.<\/em><\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043c\u0430\u043f\u044b \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u0430 \u0435\u0435 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<pre><code>(stringmap \"a\") ; => 1 (keymap :a) ; => 1<\/code><\/pre>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u043c\u0430\u043f\u044b. \u0421\u0442\u0440\u043e\u043a\u0438 \u0442\u0430\u043a \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f.<\/p>\n<pre><code>(:b keymap) ; => 2  (\"a\" stringmap) ; => Exception: java.lang.String cannot be cast to clojure.lang.IFn<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f nil.<\/p>\n<pre><code>(stringmap \"d\") ; => nil<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 assoc \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u0445\u044d\u0448\u043c\u0430\u043f\u044b.<\/p>\n<pre><code>(assoc keymap :d 4) ; => {:a 1, :b 2, :c 3, :d 4}<\/code><\/pre>\n<p>\u041d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0442\u0438\u043f\u044b clojure \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b!<\/p>\n<pre><code>keymap ; => {:a 1, :b 2, :c 3}<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 dissoc \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439<\/p>\n<pre><code>(dissoc keymap :a :b) ; => {:c 3}<\/code><\/pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438<\/h3>\n<pre><code>(class #{1 2 3}) ; => clojure.lang.PersistentHashSet (set [1 2 3 1 2 3 3 2 1 3 2 1]) ; => #{1 2 3}<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e conj<\/p>\n<pre><code>(conj #{1 2 3} 4) ; => #{1 2 3 4}<\/code><\/pre>\n<p>\u0423\u0434\u0430\u043b\u0438\u0442\u0435 \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e disj<\/p>\n<pre><code>(disj #{1 2 3} 1) ; => #{2 3} ````  Test for existence by using the set as a function:  ```clojure (#{1 2 3} 1) ; => 1 (#{1 2 3} 4) ; => nil<\/code><\/pre>\n<p>\u0412 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d clojure.sets \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<h3>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b<\/h3>\n<p>\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 clojure \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0430\u043a\u0440\u043e\u0441\u044b, \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u043d\u0438 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435<\/p>\n<pre><code>(if false \"a\" \"b\") ; => \"b\" (if false \"a\") ; => nil<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 let \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u044f\u0437\u043e\u043a<\/p>\n<pre><code>(let [a 1 b 2]   (> a b)) ; => false<\/code><\/pre>\n<p>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e do<\/p>\n<pre><code>(do   (print \"Hello\")   \"World\") ; => \"World\" (prints \"Hello\")<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043c\u0435\u044e\u0442 \u043d\u0435\u044f\u0432\u043d\u044b\u0439 do<\/p>\n<pre><code>(defn print-and-say-hello [name]   (print \"Saying hello to \" name)   (str \"Hello \" name)) (print-and-say-hello \"Jeff\") ;=> \"Hello Jeff\" (prints \"Saying hello to Jeff\")<\/code><\/pre>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 let<\/p>\n<pre><code>(let [name \"Urkel\"]   (print \"Saying hello to \" name)   (str \"Hello \" name)) ; => \"Hello Urkel\" (prints \"Saying hello to Urkel\")<\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/h3>\n<p>\u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b. \u0412 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 Clojure \u0435\u0441\u0442\u044c \u0444\u043e\u0440\u043c\u0430 <code>ns<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d. \u0414\u043e\u043c\u0435\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d \u043e\u0431\u044b\u0447\u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, GitHub user\/organisation).<\/p>\n<pre><code>(ns domain.namespace-name)<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b Practicalli \u0438\u043c\u0435\u044e\u0442 \u0434\u043e\u043c\u0435\u043d\u044b \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d <code>practicalli<\/code><\/p>\n<pre><code>(ns practicalli.service-name)<\/code><\/pre>\n<p><code>require<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u0434\u0443 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d, \u043b\u0438\u0431\u043e \u0438\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Clojure, \u043b\u0438\u0431\u043e \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0432 <code>classpath<\/code> (\u043f\u0443\u0442\u044c \u043a \u043a\u043b\u0430\u0441\u0441\u0430\u043c) \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>:as<\/code> \u0432 <code>require<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u0438 \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<p>\u0418\u043b\u0438 <code>:refer [function-name var-name]<\/code> \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (vars), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.<\/p>\n<p>\u0422\u0440\u0435\u0431\u0443\u0435\u043c\u0430\u044f (required) \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a \u0444\u043e\u0440\u043c\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d<\/p>\n<pre><code>(ns practicalli.service-name   (require [clojure.set :as set]))<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 clojure.set \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c, \u0430 \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f, \u0442.\u0435. <code>clojure.set\/intersection<\/code><\/p>\n<pre><code>(set\/intersection #{1 2 3} #{2 3 4}) ; => #{2 3} (set\/difference #{1 2 3} #{2 3 4}) ; => #{1}<\/code><\/pre>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>:require<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/p>\n<pre><code>(ns test   (:require     [clojure.string :as string]     [clojure.set :as set]))<\/code><\/pre>\n<p><code>require<\/code> \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u043e\u0431\u044b\u0447\u043d\u043e \u0432 \u0431\u043b\u043e\u043a\u0435 \u043c\u043d\u043e\u0433\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430<\/p>\n<pre><code>(comment   (require 'clojure.set :as set))<\/code><\/pre>\n<h3>Java<\/h3>\n<p>\u0412 Java \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u0430\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c, \u043a\u0430\u043a \u0441 \u043d\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c.<\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 import \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 java<\/p>\n<pre><code>(import java.util.Date)<\/code><\/pre>\n<p>\u0418\u043b\u0438 \u0438\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 \u0438\u043c\u0435\u043d\u0438 \u043f\u0430\u043a\u0435\u0442\u0430 java<\/p>\n<pre><code>(ns test   (:import     java.util.Date     java.util.Calendar))<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0438\u043c\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u0441 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c &#171;.&#187; \u0432 \u043a\u043e\u043d\u0446\u0435, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440<\/p>\n<pre><code>(Date.) ; &lt;a date object><\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>.<\/code> \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432. \u0418\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0433\u043e\u0440\u044f\u0447\u0443\u044e \u043a\u043b\u0430\u0432\u0438\u0448\u0443 &#171;.method&#187;.<\/p>\n<pre><code>(. (Date.) getTime) ; &lt;a timestamp> (.getTime (Date.))  ; exactly the same thing.<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>\/<\/code> \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432<\/p>\n<pre><code>(System\/currentTimeMillis) ; &lt;a timestamp> (system is always present)<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 doto, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u044f \u043e\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 (\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u043c\u0438 [\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u043c\u0438]) \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u043b\u0435\u0440\u0430\u043d\u0442\u043d\u044b\u043c\u0438<\/p>\n<pre><code>(import java.util.Calendar) (doto (Calendar\/getInstance)   (.set 2000 1 1 0 0 0)   .getTime) ; => A Date. set to 2000-01-01 00:00:00<\/code><\/pre>\n<hr\/>\n<p>\u042f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Clojure \u2014 \u044d\u0442\u043e \u044f\u0437\u044b\u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043d\u0430 \u043d\u0451\u043c \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u041d\u043e \u0434\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043d\u0430 Clojure \u0431\u044b\u043b\u0430 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0442\u0440\u0443\u0434\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c, \u0438\u0437-\u0437\u0430 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430 JVM.<\/p>\n<p>\u041f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 GraalVM \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043e\u0431\u043e\u0439\u0442\u0438 \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435. \u0421\u043a\u0440\u0438\u043f\u0442\u044b, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 Clojure, \u0441\u0442\u0430\u0440\u0442\u0443\u044e\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d REPL \u0438 \u0432\u0435\u0441\u044c \u0430\u0440\u0441\u0435\u043d\u0430\u043b \u044f\u0437\u044b\u043a\u0430 Clojure. <a href=\"https:\/\/otus.pw\/xuVg\/\">\u041d\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u043c \u0432\u0435\u0431\u0438\u043d\u0430\u0440\u0435<\/a> \u0432\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0435\u0441\u044c \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c Babashka \u0438 \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442\u044b. \u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0432\u0441\u0435\u0445 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0445. <\/p>\n<p>\u0417\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0443\u0440\u043e\u043a \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/otus.pw\/xuVg\/\">\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 &#171;Clojure Developer&#187;.<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/725060\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/725060\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u044d\u043a\u0441\u043a\u0443\u0440\u0441 \u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 Clojure, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u0435\u043d, \u0447\u0442\u043e \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0440\u0430\u0437\u0434\u0435\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0437\u0430 15 \u043c\u0438\u043d\u0443\u0442 (\u0438\u043b\u0438 \u043c\u0435\u043d\u044c\u0448\u0435).<\/p>\n<h3>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438<\/h3>\n<p><code>;;<\/code> \u0434\u0432\u0435 \u0442\u043e\u0447\u043a\u0438 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u0441\u0442\u0440\u043e\u043a\u0438, <code>;<\/code> \u043e\u0434\u043d\u0430 \u0442\u043e\u0447\u043a\u0430 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0438<\/p>\n<p><code>#_<\/code> \u043c\u0430\u043a\u0440\u043e\u0441 \u0447\u0442\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u043e\u0440\u043c\u0443<\/p>\n<p><code>(comment )<\/code> \u0444\u043e\u0440\u043c\u0430 \u0434\u043b\u044f \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043a\u043e \u0432\u0441\u0435\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c\u0441\u044f \u0444\u043e\u0440\u043c\u0430\u043c<\/p>\n<h3>Clojure \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u0432 \u0444\u043e\u0440\u043c\u0430\u0445<\/h3>\n<p>Clojure \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0432 &#171;\u0444\u043e\u0440\u043c\u0430\u0445&#187;, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u043f\u0438\u0441\u043a\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u0432 \u043a\u0440\u0443\u0433\u043b\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 <code>()<\/code> \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c\u0438.<\/p>\n<p>Clojure \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u043f\u0435\u0440\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0444\u043e\u0440\u043c\u0435 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0444\u043e\u0440\u043c\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>Clojure \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u043d \u0432 \u0432\u0438\u0434\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d. \u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0443\u0442\u044c \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u0438 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d.<\/p>\n<pre><code>;; Define the namespace test (ns test.code)  ;; src\/test\/code.clj  ;; Define a longer namespace (ns com.company.product.component.core)  ;; src\/com\/company\/product\/component\/core.clj <\/code><\/pre>\n<h3>\u041c\u0430\u043d\u0438\u043f\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0430\u043c\u0438<\/h3>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>str<\/code> \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0438\u0437 \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432<\/p>\n<pre><code>(str \"Hello\" \" \" \"World\") ; => \"Hello World\"<\/code><\/pre>\n<p><code>clojure.string<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u0434\u0440\u0443\u0433\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430)<\/p>\n<h3>Math (\u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430), Truth (\u0438\u0441\u0442\u0438\u043d\u0430) \u0438 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u0430\u044f \u043d\u043e\u0442\u0430\u0446\u0438\u044f<\/h3>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043d\u0443\u044e \u043d\u043e\u0442\u0430\u0446\u0438\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0435\u0433\u043a\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438<\/p>\n<pre><code>(+ 1 2 3 5 7 9 12) ; => 40 (- 24 7 3) ; => 14 (* 1 2) ; => 2 (\/ 27 7) ; => 22\/7<\/code><\/pre>\n<p>\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u043e\u0447\u0435\u043d\u044c \u0442\u043e\u0447\u0435\u043d, \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u0445 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 (\u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u0435\u0442)<\/p>\n<p>\u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u0442\u043e\u0447\u043d\u044b<\/p>\n<pre><code>(+ 1 (- 3 2)) ; = 1 + (3 - 2) => 2<\/code><\/pre>\n<p>\u0420\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u2014 \u044d\u0442\u043e =<\/p>\n<pre><code>(= 1 1) ; => true (= 2 1) ; => false<\/code><\/pre>\n<p><code>;<\/code> \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043b\u043e\u0433\u0438\u043a\u0435 not, \u0442\u0430\u043a\u00a0 <code>(not true) ; => false<\/code><\/p>\n<pre><code>(not= true false) ; => true<\/code><\/pre>\n<h3>\u0422\u0438\u043f\u044b<\/h3>\n<p>Clojure \u0438\u043c\u0435\u0435\u0442 \u0441\u0442\u0440\u043e\u0433\u0443\u044e \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 Clojure \u0432\u0441\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0438\u043f\u043e\u043c.<\/p>\n<p>Clojure \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0438\u043f\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u0438\u043f. \u0422\u0438\u043f \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u0434\u0435, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u043e\u0434 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0438 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u043c.<\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 Clojure \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0430\u0435\u043c\u044b\u043c \u043d\u0430 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435 \u044f\u0437\u044b\u043a\u043e\u043c, \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0442\u0438\u043f\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0439 \u0441\u0440\u0435\u0434\u044b, \u0433\u0434\u0435 \u044d\u0442\u043e \u0443\u043c\u0435\u0441\u0442\u043d\u043e. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Clojure \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0435 \u0442\u0438\u043f\u044b Java \u0434\u043b\u044f \u0431\u0443\u043b\u0435\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u0442\u0440\u043e\u043a \u0438 \u0447\u0438\u0441\u0435\u043b.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0438\u043f\u0430 \u043a\u043e\u0434\u0430 \u0432 Clojure \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <code>class<\/code> \u0438\u043b\u0438 <code>type<\/code>.<\/p>\n<pre><code>(class 1) ; Integer literals are java.lang.Long by default (class 1.); Float literals are java.lang.Double (class \"\"); Strings always double-quoted, and are java.lang.String (class false) ; Booleans are java.lang.Boolean (class nil); The \"null\" value is called nil<\/code><\/pre>\n<p>Vectors (\u0432\u0435\u043a\u0442\u043e\u0440\u044b) \u0438 Lists (\u0441\u043f\u0438\u0441\u043a\u0438) \u2014 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u043a\u043b\u0430\u0441\u0441\u044b java!<\/p>\n<pre><code>(class [1 2 3]); => clojure.lang.PersistentVector (class '(1 2 3)); => clojure.lang.PersistentList<\/code><\/pre>\n<h3>\u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>\u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Clojure:<\/p>\n<ul>\n<li>\n<p><code>(1 2 \"three\")<\/code> \u0438\u043b\u0438 <code>(list 1 2 \"three\")<\/code> \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0439 \u043e\u0442 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e \u043a\u043e\u043d\u0446\u0430 (\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f)<\/p>\n<\/li>\n<li>\n<p><code>[1 2 \"three\"]<\/code> \u0438\u043b\u0438 <code>(list 1 2 \"three\")<\/code> \u2014 \u0432\u0435\u043a\u0442\u043e\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c (\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f)<\/p>\n<\/li>\n<li>\n<p><code>{:key \"value\"}<\/code> \u0438\u043b\u0438 <code>(hash-map :key \"value\")<\/code> \u2014 \u0445\u044d\u0448\u0442\u0430\u0431\u043b\u0438\u0446\u0430 (\u0445\u044d\u0448\u043c\u0430\u043f\u0430) \u0441 \u043d\u0443\u043b\u0435\u043c \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u0430\u0440 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c)<\/p>\n<\/li>\n<li>\n<p><code>#{1 2 \"three\"}<\/code> \u0438\u043b\u0438 <code>(set 1 2 \"three\")<\/code> \u2014 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a <code>()<\/code> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430 \u2014 \u0438\u043c\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>'<\/code> quote \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e Clojure, \u0447\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u043a \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<pre><code>'(1 2 3)<\/code><\/pre>\n<p>\u0421\u043f\u0438\u0441\u043a\u0438 \u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u2014 \u044d\u0442\u043e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438<\/p>\n<pre><code>(coll? '(1 2 3)) ; => true (coll? [1 2 3]) ; => true<\/code><\/pre>\n<p>\u0422\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u0438\u0441\u043a\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044f\u043c\u0438<\/p>\n<pre><code>(seq? '(1 2 3)) ; => true (seq? [1 2 3]) ; => false<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u2014 \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043f\u0438\u0441\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043b\u0435\u043d\u0438\u0432\u044b\u043c\u0438. &#171;\u041b\u0435\u043d\u0438\u0432\u0430\u044f&#187; \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043d\u0435 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440, \u043f\u043e\u043a\u0430 \u043a \u043d\u0435\u0439 \u043d\u0435 \u043e\u0431\u0440\u0430\u0442\u044f\u0442\u0441\u044f.<\/p>\n<p>\u041b\u0435\u043d\u0438\u0432\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a:<\/p>\n<pre><code> (range) ; => (0 1 2 3 4 ...) - an infinite series (take 4 (range)) ;  (0 1 2 3) - lazyily evaluate range and stop when enough values are taken<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 cons \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u043b\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430<\/p>\n<pre><code>(cons 4 [1 2 3]) ; => (4 1 2 3) (cons 4 '(1 2 3)) ; => (4 1 2 3)<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 conj, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0438\u043f\u0430 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438, \u0432 \u043d\u0430\u0447\u0430\u043b\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u043b\u0438 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0432\u0435\u043a\u0442\u043e\u0440\u0430<\/p>\n<pre><code>(conj [1 2 3] 4) ; => [1 2 3 4] (conj '(1 2 3) 4) ; => (4 1 2 3)<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 concat \u0434\u043b\u044f \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u043e\u0432 \u0438\u043b\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u0435<\/p>\n<pre><code>(concat [1 2] '(3 4)) ; => (1 2 3 4)<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 filter, map \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u043c\u0438<\/p>\n<pre><code>(map inc [1 2 3]) ; => (2 3 4) (filter even? [1 2 3]) ; => (2)<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 reduce \u0434\u043b\u044f \u0438\u0445 \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f<\/p>\n<pre><code>(reduce + [1 2 3 4]) ; = (+ (+ (+ 1 2) 3) 4) ; => 10<\/code><\/pre>\n<p>Reduce \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/p>\n<pre><code>(reduce conj [] '(3 2 1)) ; => [3 2 1]<\/code><\/pre>\n<p>\u042d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442 <code>(conj (conj (conj (conj [] 3) 2) 1)<\/code><\/p>\n<h3>\u0424\u0443\u043d\u043a\u0446\u0438\u0438<\/h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <code>fn<\/code> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0445 \u043a\u0430\u043a\u043e\u0435-\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435. <code>fn<\/code> \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0438\u043c\u0435\u043d\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0441\u043b\u0430\u0442\u044c\u0441\u044f, \u0438 \u0435\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0435 \u0441\u043f\u0438\u0441\u043a\u0430.<\/p>\n<pre><code>(fn hello [] \"Hello World\") ; => hello<\/code><\/pre>\n<p>\u041e\u0431\u0435\u0440\u043d\u0438\u0442\u0435 \u0444\u043e\u0440\u043c\u0443 <code>(fn ,,,)<\/code> \u0432 \u043a\u0440\u0443\u0433\u043b\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0435\u0435 \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/p>\n<pre><code>((fn hello [] \"Hello World\")) ; => \"Hello World\"<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>def<\/code>, \u0441\u043e\u0437\u0434\u0430\u0432 \u0438\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 <code>var<\/code>. \u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0432 <code>def<\/code>, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e, \u0430 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043e\u0446\u0435\u043d\u0435\u043d\u043e \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f.<\/p>\n<pre><code>(defn hello-world []   \"Hello World\") ;; => \"Hello World\"<\/code><\/pre>\n<p>[] \u2014 \u044d\u0442\u043e \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<pre><code>(defn hello [name]   (str \"Hello \" name)) (hello \"Steve\") ; => \"Hello Steve\"<\/code><\/pre>\n<p>Clojure \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u0440\u0438\u0430\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043e\u0434\u043d\u043e\u043c\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<pre><code>(defn hello3   ([] \"Hello World\")   ([name] (str \"Hello \" name))) (hello3 \"Jake\") ; => \"Hello Jake\" (hello3) ; => \"Hello World\"<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<pre><code>(defn count-args [&amp; args]   (str \"You passed \" (count args) \" args: \" args)) (count-args 1 2 3) ; => \"You passed 3 args: (1 2 3)\"<\/code><\/pre>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0438 \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b<\/p>\n<pre><code>(defn hello-count [name &amp; args]   (str \"Hello \" name \", you passed \" (count args) \" extra args\")) (hello-count \"Finn\" 1 2 3) ; => \"Hello Finn, you passed 3 extra args\"<\/code><\/pre>\n<h3>\u041a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u0445\u044d\u0448\u043c\u0430\u043f\u043e\u0432 (hash-map)<\/h3>\n<pre><code>(class {:a 1 :b 2 :c 3}) ; => clojure.lang.PersistentArrayMap<\/code><\/pre>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u044b \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0431\u043e\u043d\u0443\u0441\u043e\u043c \u0432 \u043f\u043b\u0430\u043d\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438<\/p>\n<pre><code>(class :a) ; => clojure.lang.Keyword<\/code><\/pre>\n<p>\u041c\u0430\u043f\u044b \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u044e\u0447\u0430, \u043d\u043e \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430<\/p>\n<pre><code>(def stringmap (hash-map \"a\" 1, \"b\" 2, \"c\" 3)) stringmap  ; => {\"a\" 1, \"b\" 2, \"c\" 3}  (def keymap (hash-map :a 1 :b 2 :c 3)) keymap ; => {:a 1, :c 3, :b 2} (order is not guaranteed)<\/code><\/pre>\n<p><em>\u0417\u0430\u043f\u044f\u0442\u044b\u0435 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u044b. \u0417\u0430\u043f\u044f\u0442\u044b\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0438 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f Clojure-\u0440\u0438\u0434\u0435\u0440\u043e\u043c.<\/em><\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0437 \u043c\u0430\u043f\u044b \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u0430 \u0435\u0435 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<pre><code>(stringmap \"a\") ; => 1 (keymap :a) ; => 1<\/code><\/pre>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u043c\u0430\u043f\u044b. \u0421\u0442\u0440\u043e\u043a\u0438 \u0442\u0430\u043a \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f.<\/p>\n<pre><code>(:b keymap) ; => 2  (\"a\" stringmap) ; => Exception: java.lang.String cannot be cast to clojure.lang.IFn<\/code><\/pre>\n<p>\u041f\u0440\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f nil.<\/p>\n<pre><code>(stringmap \"d\") ; => nil<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 assoc \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043a\u043b\u044e\u0447\u0435\u0439 \u0432 \u0445\u044d\u0448\u043c\u0430\u043f\u044b.<\/p>\n<pre><code>(assoc keymap :d 4) ; => {:a 1, :b 2, :c 3, :d 4}<\/code><\/pre>\n<p>\u041d\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0442\u0438\u043f\u044b clojure \u0438\u043c\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b!<\/p>\n<pre><code>keymap ; => {:a 1, :b 2, :c 3}<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 dissoc \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439<\/p>\n<pre><code>(dissoc keymap :a :b) ; => {:c 3}<\/code><\/pre>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438<\/h3>\n<pre><code>(class #{1 2 3}) ; => clojure.lang.PersistentHashSet (set [1 2 3 1 2 3 3 2 1 3 2 1]) ; => #{1 2 3}<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e conj<\/p>\n<pre><code>(conj #{1 2 3} 4) ; => #{1 2 3 4}<\/code><\/pre>\n<p>\u0423\u0434\u0430\u043b\u0438\u0442\u0435 \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e disj<\/p>\n<pre><code>(disj #{1 2 3} 1) ; => #{2 3} ````  Test for existence by using the set as a function:  ```clojure (#{1 2 3} 1) ; => 1 (#{1 2 3} 4) ; => nil<\/code><\/pre>\n<p>\u0412 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d clojure.sets \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0439.<\/p>\n<h3>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u044b<\/h3>\n<p>\u041b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 clojure \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u0430\u043a\u0440\u043e\u0441\u044b, \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u043d\u0438 \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435<\/p>\n<pre><code>(if false \"a\" \"b\") ; => \"b\" (if false \"a\") ; => nil<\/code><\/pre>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 let \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0432\u044f\u0437\u043e\u043a<\/p>\n<pre><code>(let [a 1 b 2]   (> a b)) ; => false<\/code><\/pre>\n<p>\u0413\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e do<\/p>\n<pre><code>(do   (print \"Hello\")   \"World\") ; => \"World\" (prints \"Hello\")<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u043c\u0435\u044e\u0442 \u043d\u0435\u044f\u0432\u043d\u044b\u0439 do<\/p>\n<pre><code>(defn print-and-say-hello [name]   (print \"Saying hello to \" name)   (str \"Hello \" name)) (print-and-say-hello \"Jeff\") ;=> \"Hello Jeff\" (prints \"Saying hello to Jeff\")<\/code><\/pre>\n<p>\u0422\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 let<\/p>\n<pre><code>(let [name \"Urkel\"]   (print \"Saying hello to \" name)   (str \"Hello \" name)) ; => \"Hello Urkel\" (prints \"Saying hello to Urkel\")<\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/h3>\n<p>\u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b. \u0412 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 Clojure \u0435\u0441\u0442\u044c \u0444\u043e\u0440\u043c\u0430 <code>ns<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d. \u0414\u043e\u043c\u0435\u043d\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d \u043e\u0431\u044b\u0447\u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, GitHub user\/organisation).<\/p>\n<pre><code>(ns domain.namespace-name)<\/code><\/pre>\n<p>\u0412\u0441\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b Practicalli \u0438\u043c\u0435\u044e\u0442 \u0434\u043e\u043c\u0435\u043d\u044b \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d <code>practicalli<\/code><\/p>\n<pre><code>(ns practicalli.service-name)<\/code><\/pre>\n<p><code>require<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u0434\u0443 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d, \u043b\u0438\u0431\u043e \u0438\u0437 \u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Clojure, \u043b\u0438\u0431\u043e \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0432 <code>classpath<\/code> (\u043f\u0443\u0442\u044c \u043a \u043a\u043b\u0430\u0441\u0441\u0430\u043c) \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>:as<\/code> \u0432 <code>require<\/code> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0438\u043c\u0435\u043d\u0438 \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<p>\u0418\u043b\u0438 <code>:refer [function-name var-name]<\/code> \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (vars), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e.<\/p>\n<p>\u0422\u0440\u0435\u0431\u0443\u0435\u043c\u0430\u044f (required) \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a \u0444\u043e\u0440\u043c\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d<\/p>\n<pre><code>(ns practicalli.service-name   (require [clojure.set :as set]))<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 clojure.set \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c, \u0430 \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f, \u0442.\u0435. <code>clojure.set\/intersection<\/code><\/p>\n<pre><code>(set\/intersection #{1 2 3} #{2 3 4}) ; => #{2 3} (set\/difference #{1 2 3} #{2 3 4}) ; => #{1}<\/code><\/pre>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>:require<\/code> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u0434\u043b\u044f \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432 \u0438\u043c\u0435\u043d \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/p>\n<pre><code>(ns test<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-347337","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/347337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=347337"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/347337\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=347337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=347337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=347337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}