Liking cljdoc? Tell your friends :D
Clojure only.

clojure.core.match


*backtrack-stack*clj


*clojurescript*clj


*line*clj


*locals*clj


*match-lookup*clj

Allow map matching syntax to check for IMatchLookup

Allow map matching syntax to check for IMatchLookup
raw docstring

*no-backtrack*clj

Flag to optimize performance over code size.

Flag to optimize performance over code size.
raw docstring

*recur-present*clj

In the presence of recur we cannot apply code size optimizations

In the presence of recur we cannot apply code size optimizations
raw docstring

*root*clj


*syntax-check*clj

Enable syntax check of match macros

Enable syntax check of match macros
raw docstring

*vector-type*clj

Default vector type. Can be rebound allowing emission of custom inline code for vector patterns, for example type-hinted primitive array operations

Default vector type. Can be rebound allowing emission of
custom inline code for vector patterns, for example
type-hinted primitive array operations
raw docstring

*warned*clj


action-for-rowclj

(action-for-row {rows :rows} j)

all-wildcards?clj

(all-wildcards? prow)

app-patternclj

(app-pattern p form)

app-pattern-matrix-ocrsclj

(app-pattern-matrix-ocrs [focr :as ocrs] form)

app-pattern?clj

(app-pattern? x)

array-tagclj

(array-tag x)

as-patternclj


backtrackclj

Pre-allocated exception used for backtracing

Pre-allocated exception used for backtracing
raw docstring

backtrack-exprclj

(backtrack-expr)

backtrack-symclj

(backtrack-sym)

bind-nodeclj

(bind-node bindings node)

bind-variablesclj

(bind-variables ocrs)

calc-rest?-and-min-sizeclj

(calc-rest?-and-min-size rows env)

casesclj

(cases matrix)

catch-errorclj

(catch-error & body)

check-matrix-argsclj

(check-matrix-args vars clauses)

check-patternclj

(check-pattern pat vars nvars rownum)

check-size?cljmultimethod


choose-columnclj

(choose-column matrix)

clj-formclj

(clj-form vars clauses)

columnclj

(column {rows :rows} i)

column-splitterclj

(column-splitter col)

compileclj

(compile {:keys [rows ocrs] :as pm})

constructor?clj

(constructor? p)

constructors-above?clj

(constructors-above? pm i j)

count-inlinecljmultimethod


dag-clause-to-cljclj

(dag-clause-to-clj occurrence pattern action)

default-caseclj

(default-case matrix)

default-specialize-matrixclj

(default-specialize-matrix p matrix)

defpredcljmacro

(defpred name)
(defpred name f)

dimclj

(dim pm)

drop-nth-bindclj

(drop-nth-bind prow n ocr)

emit-matrixclj

(emit-matrix vars clauses)
(emit-matrix vars clauses default)

Take the list of vars and sequence of unprocessed clauses and return the pattern matrix. The pattern matrix contains the processed pattern rows and the list of vars originally specified. Inserts a last match - :else if provided by the user or a default match that throws.

Take the list of vars and sequence of unprocessed clauses and
return the pattern matrix. The pattern matrix contains the processed
pattern rows and the list of vars originally specified. Inserts
a last match - :else if provided by the user or a default match that
throws.
raw docstring

emit-patterncljmultimethod

Returns the corresponding pattern for the given syntax. Dispatches on the class of its argument. For example, [(:or 1 2) 2] is dispatched as clojure.lang.IPersistentVector

Returns the corresponding pattern for the given syntax. Dispatches
on the class of its argument. For example, `[(:or 1 2) 2]` is dispatched
as clojure.lang.IPersistentVector
raw docstring

emit-pattern-for-syntaxcljmultimethod

Handles patterns wrapped in the special list syntax. Dispatches on the first or second keyword in the list. For example, the pattern (:or 1 ...) is dispatches as :or, and(1 :as a)` is dispatched by :as.

Handles patterns wrapped in the special list syntax. Dispatches
on the first or second keyword in the list. For example, the pattern
`(:or 1 ...) is dispatches as :or, and `(1 :as a)` is dispatched by :as.
raw docstring

emit-patternsclj

(emit-patterns ps t)
(emit-patterns ps t v)

empty-matrix?clj

(empty-matrix? pm)

empty-row?clj

(empty-row? row)

empty-rows-caseclj

(empty-rows-case)

Case 1: If there are no pattern rows to match, then matching always fails

Case 1: If there are no pattern rows to match, then matching always fails
raw docstring

executable-formclj

(executable-form node)

existential-pattern?clj

(existential-pattern? x)

expand-matrixclj

(expand-matrix matrix col)

expression?clj

(expression? ocr)

fail-nodeclj

(fail-node)

find-duplicate-wildcardsclj

(find-duplicate-wildcards pattern)

first-column-chosen-caseclj

(first-column-chosen-case matrix col ocrs)

Case 3a: The first column is chosen. Compute and return a switch/bind node with a default matrix case

Case 3a: The first column is chosen. Compute and return a
switch/bind node with a default matrix case
raw docstring

first-column?clj

(first-column? i)

first-row-empty-caseclj

(first-row-empty-case rows ocr)

Case 2: If the first row is empty then matching always succeeds and yields the first action.

Case 2: If the first row is empty then matching always succeeds
and yields the first action.
raw docstring

first-row-wildcards-caseclj

(first-row-wildcards-case rows ocrs)

Case 2: If the first row is constituted by wildcards then matching matching always succeeds and yields the first action.

Case 2: If the first row is constituted by wildcards then matching
matching always succeeds and yields the first action.
raw docstring

gen-map-pattern-ocrclj

(gen-map-pattern-ocr ocr k)

get-all-keysclj

(get-all-keys rows env)

get-loop-localsclj

(get-loop-locals)

get-ocr-mapclj

(get-ocr-map p {:keys [only all-keys wc-map]})

group-keywordsclj

(group-keywords pattern)

Returns a pattern with pattern-keywords (:when and :as) properly grouped. The original pattern may use the 'flattened' syntax. For example, a 'flattened' pattern row like [a b :when even?] is grouped as [a (b :when even?)].

Returns a pattern with pattern-keywords (:when and :as) properly
grouped.  The original pattern may use the 'flattened' syntax.
For example, a 'flattened' pattern row like [a b :when even?] is
grouped as [a (b :when even?)].
raw docstring

group-rowsclj

(group-rows cs rows)

groupable?cljmultimethod

Determine if two patterns may be grouped together for simultaneous testing.

Determine if two patterns may be grouped together for simultaneous
testing.
raw docstring

guard-patternclj


guard-pattern?clj

(guard-pattern? x)

heightclj

(height {rows :rows})

leaf-bind-exprcljmultimethod


leaf-nodeclj

(leaf-node value)
(leaf-node value bindings)

literal-case-matrix-splitterclj

(literal-case-matrix-splitter matrix)

literal-patternclj

(literal-pattern l)

literal-pattern?clj

(literal-pattern? x)

map-key-patternclj

(map-key-pattern p)

map-key-pattern?clj

(map-key-pattern? x)

map-patternclj

(map-pattern)
(map-pattern m)

map-pattern-matrix-ocr-symclj

(map-pattern-matrix-ocr-sym k env)

map-pattern-matrix-ocrsclj

(map-pattern-matrix-ocrs ocrs env)

map-pattern?clj

(map-pattern? x)

matchcljmacro

(match vars & clauses)

Pattern match a row of occurrences. Take a vector of occurrences, vars. Clause question-answer syntax is like cond. Questions must be wrapped in a vector, with same arity as vars. Last question can be :else, which expands to a row of wildcards. Optionally may take a single var not wrapped in a vector, questions then need not be wrapped in a vector.

Example: (let [x 1 y 2] (match [x y 3] [1 2 3] :answer1 :else :default-answer))

Pattern match a row of occurrences. Take a vector of occurrences, vars.
Clause question-answer syntax is like `cond`. Questions must be
wrapped in a vector, with same arity as vars. Last question can be :else,
which expands to a row of wildcards. Optionally may take a single
var not wrapped in a vector, questions then need not be wrapped in a
vector.

Example:
(let [x 1
      y 2]
  (match [x y 3]
    [1 2 3] :answer1
    :else :default-answer))
raw docstring

match-letcljmacro

(match-let bindings & body)

matchmcljmacro

(matchm vars & clauses)

Same as match but supports IMatchLookup when matching maps.

Same as match but supports IMatchLookup when
matching maps.
raw docstring

matchvcljmacro

(matchv type vars & clauses)

matrix-splitterclj

(matrix-splitter matrix)

named-wildcard-pattern?clj

(named-wildcard-pattern? x)

necessary-columnclj

(necessary-column pm)

non-local-literal-pattern?clj

(non-local-literal-pattern? p)

nth-inlinecljmultimethod


nth-offset-inlinecljmultimethod


nthnext-inlinecljmultimethod


occurrencesclj

(occurrences pm)

or-patternclj


or-pattern?clj

(or-pattern? x)

other-column-chosen-caseclj

(other-column-chosen-case matrix col)

Case 3b: A column other than the first is chosen. Swap column col with the first column and compile the result

Case 3b: A column other than the first is chosen. Swap column
col with the first column and compile the result
raw docstring

pattern-atclj

(pattern-at {rows :rows} i j)

pattern-matrixclj

(pattern-matrix rows ocrs)

pattern-rowclj

(pattern-row ps action)
(pattern-row ps action bindings)

pattern-scoreclj

(pattern-score pm i j)

predicate-patternclj


predicate-pattern?clj

(predicate-pattern? x)

predsclj


process-varsclj

(process-vars vars)

Process the vars for the pattern matrix. If user provides an expression, create a var and annotate via metadata with the original expression.

Process the vars for the pattern matrix. If user provides an
expression, create a var and annotate via metadata with the
original expression.
raw docstring

pseudo-pattern?clj

(pseudo-pattern? x)

pseudo-patternsclj

(pseudo-patterns matrix i)

recur-present?clj

(recur-present? actions)

regroup-keywordsclj

(regroup-keywords pattern)

rest-patternclj

(rest-pattern p)

rest-pattern?clj

(rest-pattern? x)

return-splitclj

(return-split S D)

root-bind-nodeclj

(root-bind-node matrix)

rowclj

(row {rows :rows} j)

row-bindingsclj

(row-bindings f ocrs)

row-keysclj

(row-keys row env)

rowsclj

(rows {rows :rows})

score-columnclj

(score-column i col)

selectclj

(select pm)

seq-patternclj

(seq-pattern s)

seq-pattern-matrix-ocrsclj

(seq-pattern-matrix-ocrs ocrs focr)

seq-pattern-matrix-rest-ocrsclj

(seq-pattern-matrix-rest-ocrs ocrs focr)

seq-pattern?clj

(seq-pattern? x)

specializeclj

(specialize matrix)
(specialize matrix p)

specialize-app-pattern-matrixclj

(specialize-app-pattern-matrix rows form)

specialize-guard-pattern-matrixclj

(specialize-guard-pattern-matrix rows)

specialize-map-key-pattern-matrixclj

(specialize-map-key-pattern-matrix rows)

specialize-map-pattern-matrixclj

(specialize-map-pattern-matrix rows env)

specialize-map-pattern-rowclj

(specialize-map-pattern-row row {:keys [all-keys only? focr] :as env})

specialize-or-pattern-matrixclj

(specialize-or-pattern-matrix rows pat ps)

specialize-or-pattern-rowclj

(specialize-or-pattern-row row pat ps)

specialize-predicate-pattern-matrixclj

(specialize-predicate-pattern-matrix rows)

specialize-seq-pattern-matrixclj

(specialize-seq-pattern-matrix rows focr)

specialize-seq-pattern-rest-matrixclj

(specialize-seq-pattern-rest-matrix rows focr)

specialize-seq-pattern-rest-rowclj

(specialize-seq-pattern-rest-row focr row)

specialize-seq-pattern-rowclj

(specialize-seq-pattern-row focr row)

specialize-vector-pattern-matrixclj

(specialize-vector-pattern-matrix rows env)

specialize-vector-pattern-rowclj

(specialize-vector-pattern-row row {:keys [focr min-size]})

specialize-vector-pattern-row-non-restclj

(specialize-vector-pattern-row-non-rest row {:keys [focr min-size]})

split-matrixclj

(split-matrix matrix)

subvec-inlinecljmultimethod


switch-nodeclj

(switch-node occurrence cases default)

tagcljmultimethod


test-inlinecljmultimethod


test-with-min-size-inlinecljmultimethod


test-with-size-inlinecljmultimethod


to-pattern-rowclj

(to-pattern-row pat action)

Take an unprocessed pattern expression and an action expression and return a pattern row of the processed pattern expression plus the action epxression.

Take an unprocessed pattern expression and an action expression and return
a pattern row of the processed pattern expression plus the action epxression.
raw docstring

to-sourcecljmultimethod

Returns a Clojure form that, when executed, is truthy if the pattern matches the occurrence. Dispatches on the type of the pattern. For instance, a literal pattern might return (= ~(:pattern pattern) ~ocr), using = to test for a match.

Returns a Clojure form that, when executed, is truthy if the
pattern matches the occurrence. Dispatches on the `type` of the
pattern. For instance, a literal pattern might return `(= ~(:pattern
pattern) ~ocr)`, using `=` to test for a match.
raw docstring

update-patternclj

(update-pattern prow i p)

useful-matrixclj

(useful-matrix pm)

val-at*clj

(val-at* m k)
(val-at* m k not-found)

val-at-exprclj

(val-at-expr & args)

vector-patternclj


vector-pattern-matrix-ocrsclj

(vector-pattern-matrix-ocrs ocrs {:keys [focr tag min-size rest?] :as env})

vector-pattern-ocr-symclj

(vector-pattern-ocr-sym {:keys [pat focr tag]} i)

vector-pattern?clj

(vector-pattern? x)

vector-typeclj

(vector-type t & r)

warnclj

(warn msg)

widthclj

(width {rows :rows})

wildcard-or-existential?clj

(wildcard-or-existential? x)

wildcard-patternclj

(wildcard-pattern)
(wildcard-pattern sym)

wildcard-pattern?clj

(wildcard-pattern? x)

wildcards-and-duplicatesclj

(wildcards-and-duplicates patterns)

Returns a vector of two elements: the set of all wildcards and the set of duplicate wildcards. The underbar _ is excluded from both.

Returns a vector of two elements: the set of all wildcards and the
set of duplicate wildcards.  The underbar _ is excluded from both.
raw docstring

with-tagclj

(with-tag t ocr)

wrap-valuesclj

(wrap-values m)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close