作成:Steve Tayon氏、継続的なメンテナンス:Andy Fingerhut氏、両氏に多謝。
| リテラル | Long:7、16進数 0xff、8進数 017、2進数 2r1011、36進数 36rCRAZY BigInt:7N Ratio:-22/7 Double:2.78 -1.2e-5 BigDecimal:4.2M |
| 算術演算 | + - * / quot rem mod inc dec max min +' -' *' inc' dec' (1.11) abs |
| 比較 | == < > <= >= compare |
| ビット演算 | bit-and bit-or bit-xor bit-not bit-flip bit-set bit-shift-right bit-shift-left bit-and-not bit-clear bit-test unsigned-bit-shift-right (BigInteger を参照 Longより大きい整数の場合) |
| キャスト | byte short int long float double bigdec bigint num rationalize biginteger |
| テスト | zero? pos? neg? even? odd? number? rational? integer? ratio? decimal? float? (1.9) double? int? nat-int? neg-int? pos-int? (1.11) NaN? infinite? |
| 乱数 | rand rand-int |
| BigDecimal | with-precision |
| チェックなし | *unchecked-math* unchecked-add unchecked-dec unchecked-inc unchecked-multiply unchecked-negate unchecked-subtract |
| 作成 | str format "a string" "エスケープ \b\f\n\t\r\" 8進数 \377 16進数 \ucafe" IO/to string セクションも参照してください。 |
| 使用 | count get subs compare (clojure.string/) join escape split split-lines replace replace-first reverse index-of last-index-of (1.11) (clojure.core/) parse-boolean parse-double parse-long parse-uuid |
| 正規表現 | #"pattern" re-find re-seq re-matches re-pattern re-matcher re-groups (clojure.string/) replace replace-first re-quote-replacement 注: |
| 文字 | (clojure.string/) capitalize lower-case upper-case |
| トリム | (clojure.string/) trim trim-newline triml trimr |
| テスト | string? (clojure.string/) blank? starts-with? ends-with? includes? |
| 文字 | char char? char-name-string char-escape-string リテラル:\a \newline (詳細はリンク先を参照) |
| キーワード | keyword keyword? find-keyword リテラル::kw :my.name.space/kw ::in-cur-namespace ::namespace-alias/kw |
| シンボル | symbol symbol? gensym リテラル:my-sym my.ns/foo |
| その他 | リテラル:true false nil |
| 汎用演算 | count empty not-empty into conj (clojure.walk/) walk prewalk prewalk-demo prewalk-replace postwalk postwalk-demo postwalk-replace (1.9) bounded-count |
| コンテンツテスト | distinct? empty? every? not-every? some not-any? |
| 機能 | sequential? associative? sorted? counted? reversible? |
| 型テスト | coll? list? vector? set? map? seq? record? map-entry? |
| 作成 | () list list* |
| 検査 | first nth peek .indexOf .lastIndexOf |
| 変更 | cons conj rest pop |
| 作成 | [] vector vec vector-of mapv filterv |
| 検査 | |
| 変更 | assoc assoc-in pop subvec replace conj rseq update update-in |
| 演算 | reduce-kv |
| ソートされていない集合の作成 | #{} set hash-set |
| ソート済み集合の作成 | sorted-set sorted-set-by (clojure.data.avl/) sorted-set sorted-set-by (flatland.ordered.set/) ordered-set (clojure.data.int-map/) int-set dense-int-set |
| 検査 | |
| 変更 | conj disj |
| 集合演算 | (clojure.set/) union difference intersection select 関連セクションも参照してください |
| テスト | (clojure.set/) subset? superset? |
| ソート済み集合 | rseq subseq rsubseq |
| ソートされていない集合の作成 | {} hash-map array-map zipmap bean frequencies group-by (clojure.set/) index |
| ソート済み集合の作成 | sorted-map sorted-map-by (clojure.data.avl/) sorted-map sorted-map-by (flatland.ordered.map/) ordered-map (clojure.data.priority-map/) priority-map (flatland.useful.map/) ordering-map (clojure.data.int-map/) int-map |
| 検査 | |
| 変更 | assoc assoc-in dissoc merge merge-with select-keys update update-in (clojure.set/) rename-keys map-invert (1.11) (clojure.core/) update-keys update-vals GitHub: Medley |
| 演算 | reduce-kv |
| エントリ | key val |
| ソート済みマップ | rseq subseq rsubseq |
| 作成 | clojure.lang.PersistentQueue/EMPTY(リテラル構文またはコンストラクタ関数はありません) |
| 検査 | peek |
| 変更 | conj pop |
| 関係代数 | (clojure.set/) join select project union difference intersection index rename |
| 作成 | transient persistent! |
| 変更 | conj! pop! assoc! dissoc! disj! 注:後続の変更には常に戻り値を使用し、元の値は決して使用しないでください! |
| 比較 | = identical? not= not compare clojure.data/diff |
| テスト | true? false? instance? nil? some? |
| コレクションから | seq vals keys rseq subseq rsubseq sequence |
| プロデューサ関数から | lazy-seq repeatedly iterate (1.11) iteration |
| 定数から | repeat range |
| その他から | file-seq line-seq resultset-seq re-seq tree-seq xml-seq iterator-seq enumeration-seq |
| seq から | keep keep-indexed |
| 短縮 | distinct filter remove take-nth for dedupe random-sample |
| 長くする | cons conj concat lazy-cat mapcat cycle interleave interpose |
| 末尾のアイテム | rest nthrest next fnext nnext drop drop-while take-last for |
| 先頭のアイテム | take take-while butlast drop-last for |
| 変更 | conj concat distinct flatten group-by partition partition-all partition-by split-at split-with filter remove replace shuffle |
| 並べ替え | reverse sort sort-by compare |
| アイテムの処理 | map pmap map-indexed mapcat for replace seque |
| 要素の抽出 | first second last rest next ffirst nfirst fnext nnext nth nthnext rand-nth when-first max-key min-key |
| コレクションの構築 | zipmap into reduce reductions set vec into-array to-array-2d mapv filterv |
| 関数への渡す | apply |
| 検索 | some filter |
| 強制評価 | doseq dorun doall run! |
| 強制されたかの確認 | realized? |
| 既製の関数 | map mapcat filter remove take take-while take-nth drop drop-while replace partition-by partition-all keep keep-indexed map-indexed distinct interpose cat dedupe random-sample (1.9) halt-when |
| 独自の作成 | completing ensure-reduced unreduced 同時実行/揮発性セクションも参照してください。 |
| 使用 | into sequence transduce eduction |
| 早期終了 | reduced reduced? deref |
| 操作 | valid? conform unform explain explain-data explain-str explain-out form describe assert check-asserts check-asserts? |
| ジェネレータ操作 | |
| 定義とレジストリ | |
| 論理演算 | |
| コレクション | |
| 正規表現 | |
| 範囲 | int-in inst-in double-in int-in-range? inst-in-range? |
| その他 | nilable multi-spec fspec conformer |
| カスタム説明 | explain-printer *explain-out* |
| 数値 | number? rational? integer? ratio? decimal? float? zero? (1.9) double? int? nat-int? neg-int? pos-int? |
| シンボル、キーワード | keyword? symbol? (1.9) ident? qualified-ident? qualified-keyword? qualified-symbol? simple-ident? simple-keyword? simple-symbol? |
| その他のスカラー | string? true? false? nil? some? (1.9) boolean? bytes? inst? uri? uuid? |
| コレクション | list? map? set? vector? associative? coll? sequential? seq? empty? (1.9) indexed? seqable? |
| その他 | (1.9) any? |
| to/from ... | spit slurp (ライターへの書き込み/リーダーからの読み取り、ソケット、ファイル名付き文字列、URIなど) |
| *out*への書き込み | pr prn print printf println newline (clojure.pprint/) print-table |
| ライターへの書き込み | (clojure.pprint/) pprint cl-format その他: (binding [*out* writer] ...) |
| 文字列へ | format with-out-str pr-str prn-str print-str println-str |
| *in*から | read-line (clojure.edn/) read (clojure.tools.reader.edn/) read |
| リーダーから | line-seq (clojure.edn/) read (clojure.tools.reader.edn/) read その他: (binding [*in* reader] ...) java.io.Reader |
| 文字列から | with-in-str (clojure.edn/) read-string (clojure.tools.reader.edn/) read-string |
| オープン | with-open (clojure.java.io/) テキスト: reader writer バイナリ: input-stream output-stream |
| バイナリ | (.write ostream byte-arr) (.read istream byte-arr) java.io.OutputStream java.io.InputStream GitHub: gloss byte-spec |
| その他 | flush (.close s) file-seq *in* *out* *err* (clojure.java.io/) file copy delete-file resource as-file as-url as-relative-path GitHub: fs |
| データリーダー | *data-readers* default-data-readers *default-data-reader-fn* |
| tap | (1.10) tap> add-tap remove-tap |
| 作成 | fn defn defn- definline identity constantly memfn comp complement partial juxt memoize fnil every-pred some-fn |
| 呼び出し | apply -> ->> trampoline as-> cond-> cond->> some-> some->> |
| テスト | fn? ifn? |
| 定義 | |
| 拡張 | |
| nullの拡張 | |
| Reify | |
| テスト | satisfies? extends? |
| その他 | extend extend-protocol extenders |
| 定義 | |
| アクセス | |
| 作成 | Pair. ->Pair map->Pair |
| テスト | record? |
| 定義 | |
| アクセス | |
| 作成 | Pair. ->Pair |
| メソッド付き | |
| 定義 | |
| メソッド定義 | |
| ディスパッチ | get-method methods |
| 削除 | remove-method remove-all-methods |
| 優先順位 | prefer-method prefers |
| 関係 | derive underive isa? parents ancestors descendants make-hierarchy |
| 作成 | defmacro definline |
| デバッグ | macroexpand-1 macroexpand (clojure.walk/) macroexpand-all |
| 分岐 | and or when when-not when-let when-first if-not if-let cond condp case when-some if-some |
| ループ | for doseq dotimes while |
| 配置 | .. doto -> ->> as-> cond-> cond->> some-> some->> |
| スコープ | binding locking time with-in-str with-local-vars with-open with-out-str with-precision with-redefs with-redefs-fn |
| 遅延評価 | lazy-cat lazy-seq delay |
| ドキュメント | assert comment doc |
, |
コンマは空白として読み取られます。可読性のために、多くの場合、マップのキー/値ペアの間に使用されます。 |
' |
引用: |
/ |
名前空間セパレータ(プリミティブ/その他セクションを参照) |
\ |
文字リテラル(プリミティブ/その他セクションを参照) |
: |
キーワード(プリミティブ/その他セクションを参照) |
; |
シングルラインコメント |
^ |
メタデータ(メタデータセクションを参照) |
*foo* |
'earmuffs' - 動的変数を示す慣例、動的でない場合、コンパイラは警告します。 |
@ |
デリファレンス: |
` |
シンタックスクォート |
foo# |
'auto-gensym' 同一の |
~ |
アンクォート |
~@ |
アンクォートスプライシング |
-> |
'thread first' マクロ -> |
->> |
'thread last' マクロ ->> |
>!! <!! >! <! |
core.async チャンネルマクロ >!! <!! >! <! |
( |
リストリテラル(コレクション/リストセクションを参照) |
[ |
ベクターリテラル(コレクション/ベクターセクションを参照) |
{ |
マップリテラル(コレクション/マップセクションを参照) |
#' |
Varクォート: |
#" |
#"p" は正規表現パターンpとして読み取られます(文字列/正規表現セクションを参照)。 |
#{ |
集合リテラル(コレクション/集合セクションを参照)。 |
#( |
匿名関数リテラル: |
% |
匿名関数の引数: |
#? |
リーダ条件式: |
#?@ |
スプライシングリーダ条件式: |
#foo |
タグ付きリテラル 例: |
#: |
マップ名前空間構文 例: |
## |
(1.9) 記号値: |
$ |
|
foo? |
述語の慣例的な接尾辞、例: zero? vector? instance?(強制されない)。 |
foo! |
安全でない操作の慣例的な接尾辞、例: set! swap! alter-meta!(強制されない)。 |
_ |
使用されない値の慣例的な名前(強制されない)。 |
#_ |
次のフォームを無視する。 |
| 一般 | |
| 略記 | |
| 共通 | |
| 例 | |
| Varについて | meta with-meta vary-meta alter-meta! reset-meta! doc find-doc test |
| バインディングフォーム/デストラクチャリング | (例) https://clojure.dokyumento.jp/reference/special_forms#binding-forms を参照してください。 https://clojure.dokyumento.jp/special_forms#let も参照してください。Spec args: (cat :bindings :clojure.core.specs.alpha/bindings :body (* any?)) ret: any?">let https://clojure.dokyumento.jp/reference/special_forms#fn を参照してください。 https://clojure.dokyumento.jp/special_forms#fn も参照してください。Spec args: (cat :fn-name (? simple-symbol?) :fn-tail (alt :arity-1 :clojure.core.specs.alpha/params+body :arity-n (+ (spec :clojure.core.specs.alpha/params+body)))) ret: any?">fn defn defmacro https://clojure.dokyumento.jp/special_forms#loopを参照してください。">loop for doseq if-let when-let if-some when-some |
| defのバリエーション | https://clojure.dokyumento.jp/special_forms#defを参照してください。">def defn defn- definline defmacro defmethod defmulti defonce defrecord |
| インターニングされたVar | declare intern binding find-var https://clojure.dokyumento.jp/special_forms#varを参照してください。">var |
| Varオブジェクト | |
| Varバリデータ | |
| カレント | |
| 作成/切り替え | |
| 追加 | |
| 検索 | |
| 検査 | |
| シンボルから | |
| 削除 | |
| ライブラリの読み込み | (チュートリアル) require use import refer |
| ロード済みリスト | ロード済みライブラリ |
| その他をロード | load load-file load-reader load-string |
| 作成 | ref |
| 検査 | deref @ ( |
| トランザクション | sync dosync io! |
| トランザクション内 | ensure ref-set alter commute |
| バリデータ | |
| 履歴 | ref-history-count ref-min-history ref-max-history |
| 作成 | agent |
| 検査 | agent-error |
| 状態変更 | send send-off restart-agent send-via set-agent-send-executor! set-agent-send-off-executor! |
| ブロッキング待ち | await await-for |
| Refバリデータ | |
| ウォッチャー | add-watch remove-watch |
| スレッド処理 | shutdown-agents |
| エラー | error-handler set-error-handler! error-mode set-error-mode! |
| その他 | *agent* release-pending-sends |
| 一般 | .. doto クラス名/ クラス名. new bean comparator enumeration-seq import iterator-seq memfn set! class class? bases supers type gen-class gen-interface definterface |
| キャスト | boolean byte short char int long float double bigdec bigint num cast biginteger |
| 例外 | throw try catch finally pst ex-info ex-data Throwable->map (1.9) StackTraceElement->vec (1.10) ex-cause ex-message (clojure.main/) ex-triage ex-str err->msg report-error |
| 作成 | proxy get-proxy-class construct-proxy init-proxy |
| その他 | proxy-mappings proxy-super update-proxy |
| 作成 | zipper seq-zip vector-zip xml-zip |
| 位置取得関数 | up down left right leftmost rightmost |
| シーケンス取得関数 | lefts rights path children |
| 変更 | make-node replace edit insert-child insert-left insert-right append-child remove |
| 移動 | next prev |
| その他 | root node branch? end? |
| XML | clojure.xml/parse xml-seq |
| REPL | *1 *2 *3 *e *print-dup* *print-length* *print-level* *print-meta* *print-readably* |
| コード | *compile-files* *compile-path* *file* *warn-on-reflection* compile loaded-libs test |
| その他 | eval force hash name *clojure-version* clojure-version (1.11) random-uuid |
| ブラウザ/シェル | (clojure.java.browse/) browse-url (clojure.java.shell/) sh with-sh-dir with-sh-env |