Syntactic sugar for map matching around core.match
.
Syntactic sugar for map matching around `core.match`.
(bind-match clause binding)
Takes a clause and replaces it's binding with binding
.
Takes a clause and replaces it's binding with `binding`.
Returns a function that when applied to a clause, returns a lens focusing on the binding of the clause.
Returns a function that when applied to a clause, returns a lens focusing on the binding of the clause.
(clause-lens key-matches-lens
path-matches-lens
key-exists-lens
path-exists-lens)
(conjunction-comp-1 rec__2619__auto__)
(conjunction-comp-1 data__2620__auto__ v__2621__auto__)
Lens for the comp-1
field from a Conjunction
record. See active.clojure.match/make-conjunction
.
Lens for the `comp-1` field from a [[Conjunction]] record. See [[active.clojure.match/make-conjunction]].
(conjunction-comp-2 rec__2619__auto__)
(conjunction-comp-2 data__2620__auto__ v__2621__auto__)
Lens for the comp-2
field from a Conjunction
record. See active.clojure.match/make-conjunction
.
Lens for the `comp-2` field from a [[Conjunction]] record. See [[active.clojure.match/make-conjunction]].
(conjunction? thing)
Is object a Conjunction
record? See active.clojure.match/make-conjunction
.
Is object a `Conjunction` record? See [[active.clojure.match/make-conjunction]].
(constant-matcher-value rec__2619__auto__)
(constant-matcher-value data__2620__auto__ v__2621__auto__)
Lens for the value
field from a ConstantMatcher
record. See active.clojure.match/make-constant-matcher
.
Lens for the `value` field from a [[ConstantMatcher]] record. See [[active.clojure.match/make-constant-matcher]].
(constant-matcher? thing)
Is object a ConstantMatcher
record? See active.clojure.match/make-constant-matcher
.
Is object a `ConstantMatcher` record? See [[active.clojure.match/make-constant-matcher]].
(dependency-for-pattern rec__2619__auto__)
(dependency-for-pattern data__2620__auto__ v__2621__auto__)
Lens for the for-pattern
field (The Pattern
that depends on this.) from a Dependency
record. See active.clojure.match/make-dependency
.
Lens for the `for-pattern` field (The [[Pattern]] that depends on this.) from a [[Dependency]] record. See [[active.clojure.match/make-dependency]].
(dependency-matcher rec__2619__auto__)
(dependency-matcher data__2620__auto__ v__2621__auto__)
Lens for the matcher
field (The matcher that must be successful for the path
.) from a Dependency
record. See active.clojure.match/make-dependency
.
Lens for the `matcher` field (The matcher that must be successful for the `path`.) from a [[Dependency]] record. See [[active.clojure.match/make-dependency]].
(dependency-path rec__2619__auto__)
(dependency-path data__2620__auto__ v__2621__auto__)
Lens for the path
field (The path that this Dependency
has a restriction on.) from a Dependency
record. See active.clojure.match/make-dependency
.
Lens for the `path` field (The path that this [[Dependency]] has a restriction on.) from a [[Dependency]] record. See [[active.clojure.match/make-dependency]].
(dependency? thing)
Is object a Dependency
record? See active.clojure.match/make-dependency
.
Is object a `Dependency` record? See [[active.clojure.match/make-dependency]].
(disjunction-comp-1 rec__2619__auto__)
(disjunction-comp-1 data__2620__auto__ v__2621__auto__)
Lens for the comp-1
field from a Disjunction
record. See active.clojure.match/make-disjunction
.
Lens for the `comp-1` field from a [[Disjunction]] record. See [[active.clojure.match/make-disjunction]].
(disjunction-comp-2 rec__2619__auto__)
(disjunction-comp-2 data__2620__auto__ v__2621__auto__)
Lens for the comp-2
field from a Disjunction
record. See active.clojure.match/make-disjunction
.
Lens for the `comp-2` field from a [[Disjunction]] record. See [[active.clojure.match/make-disjunction]].
(disjunction? thing)
Is object a Disjunction
record? See active.clojure.match/make-disjunction
.
Is object a `Disjunction` record? See [[active.clojure.match/make-disjunction]].
(existence-matcher? thing)
Is object a ExistenceMatcher
record? See active.clojure.match/make-existence-matcher
.
Is object a `ExistenceMatcher` record? See [[active.clojure.match/make-existence-matcher]].
(key-exists-clause key bind)
Returns a clause that asserts the existence of a non-nil value at key
.
Binds the value associated with key
to (key->sym key)
.
Returns a clause that asserts the existence of a non-nil value at `key`. Binds the value associated with `key` to `(key->sym key)`.
(key-exists-clause-binding rec__2619__auto__)
(key-exists-clause-binding data__2620__auto__ v__2621__auto__)
Lens for the binding
field from a KeyExistsClause
record. See active.clojure.match/make-key-exists-clause
.
Lens for the `binding` field from a [[KeyExistsClause]] record. See [[active.clojure.match/make-key-exists-clause]].
(key-exists-clause-key rec__2619__auto__)
(key-exists-clause-key data__2620__auto__ v__2621__auto__)
Lens for the key
field from a KeyExistsClause
record. See active.clojure.match/make-key-exists-clause
.
Lens for the `key` field from a [[KeyExistsClause]] record. See [[active.clojure.match/make-key-exists-clause]].
(key-exists-clause-matcher rec__2619__auto__)
(key-exists-clause-matcher data__2620__auto__ v__2621__auto__)
Lens for the matcher
field from a KeyExistsClause
record. See active.clojure.match/make-key-exists-clause
.
Lens for the `matcher` field from a [[KeyExistsClause]] record. See [[active.clojure.match/make-key-exists-clause]].
(key-exists-clause? thing)
Is object a KeyExistsClause
record? See active.clojure.match/make-key-exists-clause
.
Is object a `KeyExistsClause` record? See [[active.clojure.match/make-key-exists-clause]].
(key-matches-clause key matcher bind)
Returns a clause that matches a key
with a certain matcher
, binding the
match to a symbol based on key
.
Returns a clause that matches a `key` with a certain `matcher`, binding the match to a symbol based on `key`.
(key-matches-clause-binding rec__2619__auto__)
(key-matches-clause-binding data__2620__auto__ v__2621__auto__)
Lens for the binding
field from a KeyMatchesClause
record. See active.clojure.match/make-key-matches-clause
.
Lens for the `binding` field from a [[KeyMatchesClause]] record. See [[active.clojure.match/make-key-matches-clause]].
(key-matches-clause-key rec__2619__auto__)
(key-matches-clause-key data__2620__auto__ v__2621__auto__)
Lens for the key
field from a KeyMatchesClause
record. See active.clojure.match/make-key-matches-clause
.
Lens for the `key` field from a [[KeyMatchesClause]] record. See [[active.clojure.match/make-key-matches-clause]].
(key-matches-clause-matcher rec__2619__auto__)
(key-matches-clause-matcher data__2620__auto__ v__2621__auto__)
Lens for the matcher
field from a KeyMatchesClause
record. See active.clojure.match/make-key-matches-clause
.
Lens for the `matcher` field from a [[KeyMatchesClause]] record. See [[active.clojure.match/make-key-matches-clause]].
(key-matches-clause? thing)
Is object a KeyMatchesClause
record? See active.clojure.match/make-key-matches-clause
.
Is object a `KeyMatchesClause` record? See [[active.clojure.match/make-key-matches-clause]].
(make-binding k)
Returns k as a string if k is a symbol, otherwise returns k.
Returns k as a string if k is a symbol, otherwise returns k.
(make-conjunction comp-1 comp-2)
Construct a Conjunction
record.
comp-1
: access via active.clojure.match/conjunction-comp-1
comp-2
: access via active.clojure.match/conjunction-comp-2
Construct a `Conjunction` record. `comp-1`: access via [[active.clojure.match/conjunction-comp-1]] `comp-2`: access via [[active.clojure.match/conjunction-comp-2]]
(make-constant-matcher value)
Construct a ConstantMatcher
(A matcher that matches on exactly one value.) record.
value
: access via active.clojure.match/constant-matcher-value
Construct a `ConstantMatcher` (A matcher that matches on exactly one value.) record. `value`: access via [[active.clojure.match/constant-matcher-value]]
(make-dependency path matcher for-pattern)
Construct a Dependency
record.
path
(The path that this Dependency
has a restriction on.): access via active.clojure.match/dependency-path
matcher
(The matcher that must be successful for the path
.): access via active.clojure.match/dependency-matcher
for-pattern
(The Pattern
that depends on this.): access via active.clojure.match/dependency-for-pattern
Construct a `Dependency` record. `path` (The path that this [[Dependency]] has a restriction on.): access via [[active.clojure.match/dependency-path]] `matcher` (The matcher that must be successful for the `path`.): access via [[active.clojure.match/dependency-matcher]] `for-pattern` (The [[Pattern]] that depends on this.): access via [[active.clojure.match/dependency-for-pattern]]
(make-disjunction comp-1 comp-2)
Construct a Disjunction
record.
comp-1
: access via active.clojure.match/disjunction-comp-1
comp-2
: access via active.clojure.match/disjunction-comp-2
Construct a `Disjunction` record. `comp-1`: access via [[active.clojure.match/disjunction-comp-1]] `comp-2`: access via [[active.clojure.match/disjunction-comp-2]]
(make-existence-matcher)
Construct a ExistenceMatcher
(A matcher that matches on the existence of a value. The value must be anything but nil
.) record.
Construct a `ExistenceMatcher` (A matcher that matches on the existence of a value. The value must be anything but `nil`.) record.
(make-key k)
Returns k as a string if k is a symbol, otherwise returns k.
Returns k as a string if k is a symbol, otherwise returns k.
(make-key-exists-clause key matcher binding)
Construct a KeyExistsClause
record.
key
: access via active.clojure.match/key-exists-clause-key
matcher
: access via active.clojure.match/key-exists-clause-matcher
binding
: access via active.clojure.match/key-exists-clause-binding
Construct a `KeyExistsClause` record. `key`: access via [[active.clojure.match/key-exists-clause-key]] `matcher`: access via [[active.clojure.match/key-exists-clause-matcher]] `binding`: access via [[active.clojure.match/key-exists-clause-binding]]
(make-key-matches-clause key matcher binding)
Construct a KeyMatchesClause
(A clause that matches the value of key
of a map using matcher
. When evaluated, binds it's result to binding
.) record.
key
: access via active.clojure.match/key-matches-clause-key
matcher
: access via active.clojure.match/key-matches-clause-matcher
binding
: access via active.clojure.match/key-matches-clause-binding
Construct a `KeyMatchesClause` (A clause that matches the value of `key` of a map using `matcher`. When evaluated, binds it's result to `binding`.) record. `key`: access via [[active.clojure.match/key-matches-clause-key]] `matcher`: access via [[active.clojure.match/key-matches-clause-matcher]] `binding`: access via [[active.clojure.match/key-matches-clause-binding]]
(make-optional-clause clause)
Construct a OptionalClause
(Represents an optional clause. Contains the original clause.) record.
clause
: access via active.clojure.match/optional-clause-clause
Construct a `OptionalClause` (Represents an optional clause. Contains the original clause.) record. `clause`: access via [[active.clojure.match/optional-clause-clause]]
(make-options-matcher options)
Construct a OptionsMatcher
(A matcher that matches on one of several options.) record.
options
: access via active.clojure.match/options-matcher-options
Construct a `OptionsMatcher` (A matcher that matches on one of several options.) record. `options`: access via [[active.clojure.match/options-matcher-options]]
(make-path-exists-clause path matcher binding)
Construct a PathExistsClause
(A clause that asserts the existence of a non-nil value in a map at the path
. When evaluated, binds it's result to binding
.) record.
path
: access via active.clojure.match/path-exists-clause-path
matcher
: access via active.clojure.match/path-exists-clause-matcher
binding
: access via active.clojure.match/path-exists-clause-binding
Construct a `PathExistsClause` (A clause that asserts the existence of a non-nil value in a map at the `path`. When evaluated, binds it's result to `binding`.) record. `path`: access via [[active.clojure.match/path-exists-clause-path]] `matcher`: access via [[active.clojure.match/path-exists-clause-matcher]] `binding`: access via [[active.clojure.match/path-exists-clause-binding]]
(make-path-matches-clause path matcher binding)
Construct a PathMatchesClause
(A clause that matches the value of a map at the path
using a matcher
. When evaluated, binds it's result to binding
.) record.
path
: access via active.clojure.match/path-matches-clause-path
matcher
: access via active.clojure.match/path-matches-clause-matcher
binding
: access via active.clojure.match/path-matches-clause-binding
Construct a `PathMatchesClause` (A clause that matches the value of a map at the `path` using a `matcher`. When evaluated, binds it's result to `binding`.) record. `path`: access via [[active.clojure.match/path-matches-clause-path]] `matcher`: access via [[active.clojure.match/path-matches-clause-matcher]] `binding`: access via [[active.clojure.match/path-matches-clause-binding]]
(make-pattern name clauses)
Construct a Pattern
record.
name
: access via active.clojure.match/pattern-name
clauses
: access via active.clojure.match/pattern-clauses
Construct a `Pattern` record. `name`: access via [[active.clojure.match/pattern-name]] `clauses`: access via [[active.clojure.match/pattern-clauses]]
(make-predicate-matcher pred)
Construct a PredicateMatcher
(A matcher that matches by applying a function (a -> Bool) to a value.) record.
pred
: access via active.clojure.match/predicate-matcher-predicate
Construct a `PredicateMatcher` (A matcher that matches by applying a function (a -> Bool) to a value.) record. `pred`: access via [[active.clojure.match/predicate-matcher-predicate]]
(make-regex-matcher regex)
Construct a RegexMatcher
(A matcher that matches against a regex.) record.
regex
: access via active.clojure.match/regex-matcher-regex
Construct a `RegexMatcher` (A matcher that matches against a regex.) record. `regex`: access via [[active.clojure.match/regex-matcher-regex]]
(map-matcher & args)
Construct a map matcher. Syntactic sugar for core.match
.
`map-matcher´ accepts two kinds of inputs:
The syntax is (map-matcher <pattern> <consequent> ... :else <alternative>)
where
<pattern>
is a vector of clauses [<clause>+]
where clause
is one of the following:
(<key> <value> :as <name>)
which requires the key <key>
to be
mapped to <value>
in the map and binds <name>
to <value>
.
(<key-and-name> <value>)
which requires the key <key-and-name>
to be mapped to <value>
in the map and binds <key-and-name>
to
<value>
.
(<key> :as <name>)
which requires <key>
to be present in the map
and binds <name>
to its value.
<key-and-name>
which requires <key-and-name>
to be present in
the map and binds <key-and-name>
to its value
The map matcher also supports optional keys:
(? <key> <default> :as <name>)
binds <name>
to to the value of
<key>
in the map or to <default>
if <key>
is not in the map.
(? <key-and-name> <default>)
binds <key-and-name>
to the value of
<key-and-name>
in the map or to <default>
if <key-and-name>
is not
in the map.
(? <key> :as <name>)
binds <name>
to to the value of <key>
in the map or to nil
if <key>
is not in the map.
(? <key-and-name>)
binds <key-and-name>
to the value of
<key-and-name>
in the map or to nil
if <key-and-name>
is not
in the map.
Access to nested values is also possible. Use [<key>+]
to access
a nested value, where [<key>+]
is a sequence of keys. When no
:as <name>
clause is given, the last <key>
of the sequence of
keys is used as a name to bind the value.
<key>
and <key-and-name>
can be either a symbol or a keyword.
If <key-and-name>
is a symbol, it is converted to a string when
used as a key (and used as symbol for binding the value). If
<key-and-name>
is a keyword, it is converted to a name for binding
the value (and usesd as keyword when used as a key).
<value>
can be:
any value, regular expressions are also possible (only in Clojure, though,
core.match
does not support regex matching in ClojureScript).
a list of alternative values in the form of: (:or <value> <value>*)
.
a custom compare function in the form of:
(:compare-fn <compare-fn>)
where <compare-fn>
accepts the value that
is mapped to <key>
or <key-and-name>
.
map-matcher
returns a function that accepts a map and evaluates
<consequent>
with all the <name>
s bound when the message matches
the given <clause>
s, otherwise it evaluates <alternative>
. or
throws IllegalArgumentException
if <clause>
matches and no
<alternative>
is given.
Example:
(def example-map-matcher
(map-matcher
[(:x "x" :as x)
(:y "y")
(:z :as z)
:w]
(println x y z w)
[(:a "a" :as a)
(:b "b")
(:c :as c)
([:d Z] 42 :as Z)
([:d Y] :as Y)
([:d X] 65)
[:d W foo]]
(println a b c Z Y X foo)
:else false))
(example-map-matcher {:a "a" :b "b" :c "c"
:d {"Z" 42 "Y" 23 "X" 65
"W" {"foo" "bar"}}})
prints
"a b c d 42 23 65 bar"
Construct a map matcher. Syntactic sugar for `core.match`. `map-matcher´ accepts two kinds of inputs: 1. A sequence of alternating patterns and consequents (see below). 2. A sequence of alternating Pattern objects and consequents. The syntax is `(map-matcher <pattern> <consequent> ... :else <alternative>)` where `<pattern>` is a vector of clauses `[<clause>+]` where `clause` is one of the following: - `(<key> <value> :as <name>)` which requires the key `<key>` to be mapped to `<value>` in the map and binds `<name>` to `<value>`. - `(<key-and-name> <value>)` which requires the key `<key-and-name>` to be mapped to `<value>` in the map and binds `<key-and-name>` to `<value>`. - `(<key> :as <name>)` which requires `<key>` to be present in the map and binds `<name>` to its value. - `<key-and-name>` which requires `<key-and-name>` to be present in the map and binds `<key-and-name>` to its value The map matcher also supports optional keys: - `(? <key> <default> :as <name>)` binds `<name>` to to the value of `<key>` in the map or to `<default>` if `<key>` is not in the map. - `(? <key-and-name> <default>)` binds `<key-and-name>` to the value of `<key-and-name>` in the map or to `<default>` if `<key-and-name>` is not in the map. - `(? <key> :as <name>)` binds `<name>` to to the value of `<key>` in the map or to `nil` if `<key>` is not in the map. - `(? <key-and-name>)` binds `<key-and-name>` to the value of `<key-and-name>` in the map or to `nil` if `<key-and-name>` is not in the map. Access to nested values is also possible. Use `[<key>+]` to access a nested value, where `[<key>+]` is a sequence of keys. When no `:as <name>` clause is given, the last `<key>` of the sequence of keys is used as a name to bind the value. `<key>` and `<key-and-name>` can be either a symbol or a keyword. If `<key-and-name>` is a symbol, it is converted to a string when used as a key (and used as symbol for binding the value). If `<key-and-name>` is a keyword, it is converted to a name for binding the value (and usesd as keyword when used as a key). `<value>` can be: - any value, regular expressions are also possible (only in Clojure, though, `core.match` does not support regex matching in ClojureScript). - a list of alternative values in the form of: `(:or <value> <value>*)`. - a custom compare function in the form of: `(:compare-fn <compare-fn>)` where `<compare-fn>` accepts the value that is mapped to `<key>` or `<key-and-name>`. `map-matcher` returns a function that accepts a map and evaluates `<consequent>` with all the `<name>`s bound when the message matches the given `<clause>`s, otherwise it evaluates `<alternative>`. or throws `IllegalArgumentException` if `<clause>` matches and no `<alternative>` is given. Example: (def example-map-matcher (map-matcher [(:x "x" :as x) (:y "y") (:z :as z) :w] (println x y z w) [(:a "a" :as a) (:b "b") (:c :as c) ([:d Z] 42 :as Z) ([:d Y] :as Y) ([:d X] 65) [:d W foo]] (println a b c Z Y X foo) :else false)) (example-map-matcher {:a "a" :b "b" :c "c" :d {"Z" 42 "Y" 23 "X" 65 "W" {"foo" "bar"}}}) prints "a b c d 42 23 65 bar"
(matcher->value matcher)
Takes a matcher
and returns the value/s it matches on.
::not-nil
symbolizes the existence matcher.
Takes a `matcher` and returns the value/s it matches on. `::not-nil` symbolizes the existence matcher.
(matcher-default-value matcher)
Returns the default value of a matcher, if any.
Returns the default value of a matcher, if any.
Returns a function that when applied to a clause, returns a lens focusing on the matcher of the clause.
Returns a function that when applied to a clause, returns a lens focusing on the matcher of the clause.
(optional clause)
Takes a clause
and returns it as an optional clause. If it already was an
optional clause, this is the identity function.
Takes a `clause` and returns it as an optional clause. If it already was an optional clause, this is the identity function.
(optional-clause-clause rec__2619__auto__)
(optional-clause-clause data__2620__auto__ v__2621__auto__)
Lens for the clause
field from a OptionalClause
record. See active.clojure.match/make-optional-clause
.
Lens for the `clause` field from a [[OptionalClause]] record. See [[active.clojure.match/make-optional-clause]].
(optional-clause? thing)
Is object a OptionalClause
record? See active.clojure.match/make-optional-clause
.
Is object a `OptionalClause` record? See [[active.clojure.match/make-optional-clause]].
(options-matcher-options rec__2619__auto__)
(options-matcher-options data__2620__auto__ v__2621__auto__)
Lens for the options
field from a OptionsMatcher
record. See active.clojure.match/make-options-matcher
.
Lens for the `options` field from a [[OptionsMatcher]] record. See [[active.clojure.match/make-options-matcher]].
(options-matcher? thing)
Is object a OptionsMatcher
record? See active.clojure.match/make-options-matcher
.
Is object a `OptionsMatcher` record? See [[active.clojure.match/make-options-matcher]].
(parse-pattern pattern)
Parse the argument to defpattern
as a Pattern
.
Optionally accepts a name
(String) that names the pattern. If none is
provided, automatically assigns a name.
Parse the argument to `defpattern` as a [[Pattern]]. Optionally accepts a `name` (String) that names the pattern. If none is provided, automatically assigns a name.
(path-exists-clause path bind)
Returns a clause that asserts the existence of a non-nil value at key
.
Binds the value associated with path
to (key->sym (last path))
.
Returns a clause that asserts the existence of a non-nil value at `key`. Binds the value associated with `path` to `(key->sym (last path))`.
(path-exists-clause-binding rec__2619__auto__)
(path-exists-clause-binding data__2620__auto__ v__2621__auto__)
Lens for the binding
field from a PathExistsClause
record. See active.clojure.match/make-path-exists-clause
.
Lens for the `binding` field from a [[PathExistsClause]] record. See [[active.clojure.match/make-path-exists-clause]].
(path-exists-clause-matcher rec__2619__auto__)
(path-exists-clause-matcher data__2620__auto__ v__2621__auto__)
Lens for the matcher
field from a PathExistsClause
record. See active.clojure.match/make-path-exists-clause
.
Lens for the `matcher` field from a [[PathExistsClause]] record. See [[active.clojure.match/make-path-exists-clause]].
(path-exists-clause-path rec__2619__auto__)
(path-exists-clause-path data__2620__auto__ v__2621__auto__)
Lens for the path
field from a PathExistsClause
record. See active.clojure.match/make-path-exists-clause
.
Lens for the `path` field from a [[PathExistsClause]] record. See [[active.clojure.match/make-path-exists-clause]].
(path-exists-clause? thing)
Is object a PathExistsClause
record? See active.clojure.match/make-path-exists-clause
.
Is object a `PathExistsClause` record? See [[active.clojure.match/make-path-exists-clause]].
Returns a function that when applied to a clause, returns a lens focusing on the path of the clause.
Returns a function that when applied to a clause, returns a lens focusing on the path of the clause.
(path-matches-clause-binding rec__2619__auto__)
(path-matches-clause-binding data__2620__auto__ v__2621__auto__)
Lens for the binding
field from a PathMatchesClause
record. See active.clojure.match/make-path-matches-clause
.
Lens for the `binding` field from a [[PathMatchesClause]] record. See [[active.clojure.match/make-path-matches-clause]].
(path-matches-clause-matcher rec__2619__auto__)
(path-matches-clause-matcher data__2620__auto__ v__2621__auto__)
Lens for the matcher
field from a PathMatchesClause
record. See active.clojure.match/make-path-matches-clause
.
Lens for the `matcher` field from a [[PathMatchesClause]] record. See [[active.clojure.match/make-path-matches-clause]].
(path-matches-clause-path rec__2619__auto__)
(path-matches-clause-path data__2620__auto__ v__2621__auto__)
Lens for the path
field from a PathMatchesClause
record. See active.clojure.match/make-path-matches-clause
.
Lens for the `path` field from a [[PathMatchesClause]] record. See [[active.clojure.match/make-path-matches-clause]].
(path-matches-clause? thing)
Is object a PathMatchesClause
record? See active.clojure.match/make-path-matches-clause
.
Is object a `PathMatchesClause` record? See [[active.clojure.match/make-path-matches-clause]].
(pattern & clauses)
Takes a name and some clauses
and returns a Pattern
.
Takes a name and some `clauses` and returns a [[Pattern]].
(pattern-clauses rec__2619__auto__)
(pattern-clauses data__2620__auto__ v__2621__auto__)
Lens for the clauses
field from a Pattern
record. See active.clojure.match/make-pattern
.
Lens for the `clauses` field from a [[Pattern]] record. See [[active.clojure.match/make-pattern]].
(pattern-name rec__2619__auto__)
(pattern-name data__2620__auto__ v__2621__auto__)
Lens for the name
field from a Pattern
record. See active.clojure.match/make-pattern
.
Lens for the `name` field from a [[Pattern]] record. See [[active.clojure.match/make-pattern]].
(pattern? thing)
Is object a Pattern
record? See active.clojure.match/make-pattern
.
Is object a `Pattern` record? See [[active.clojure.match/make-pattern]].
(predicate-matcher-predicate rec__2619__auto__)
(predicate-matcher-predicate data__2620__auto__ v__2621__auto__)
Lens for the pred
field from a PredicateMatcher
record. See active.clojure.match/make-predicate-matcher
.
Lens for the `pred` field from a [[PredicateMatcher]] record. See [[active.clojure.match/make-predicate-matcher]].
(predicate-matcher? thing)
Is object a PredicateMatcher
record? See active.clojure.match/make-predicate-matcher
.
Is object a `PredicateMatcher` record? See [[active.clojure.match/make-predicate-matcher]].
(regex-matcher-regex rec__2619__auto__)
(regex-matcher-regex data__2620__auto__ v__2621__auto__)
Lens for the regex
field from a RegexMatcher
record. See active.clojure.match/make-regex-matcher
.
Lens for the `regex` field from a [[RegexMatcher]] record. See [[active.clojure.match/make-regex-matcher]].
(regex-matcher? thing)
Is object a RegexMatcher
record? See active.clojure.match/make-regex-matcher
.
Is object a `RegexMatcher` record? See [[active.clojure.match/make-regex-matcher]].
Singleton matcher. Match the existence of a vale.
Singleton matcher. Match the existence of a vale.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close