Syntactic sugar for map matching around core.match
.
Syntactic sugar for map matching around `core.match`.
(constant-matcher-value rec__3628__auto__)
(constant-matcher-value data__3629__auto__ v__3630__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]].
(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-with-binding-clause key binding)
Returns a clause that asserts the existence of a non-nil value at key
. When evaluated, binds it's result to binding
.
Returns a clause that asserts the existence of a non-nil value at `key`. When evaluated, binds it's result to `binding`.
(key-exists-with-binding-clause->rhs-match message clause)
(key-exists-with-binding-clause-binding rec__3628__auto__)
(key-exists-with-binding-clause-binding data__3629__auto__ v__3630__auto__)
Lens for the binding
field from a [[KeyExistsWithBindingClause]] record. See active.clojure.match/make-key-exists-with-binding-clause
.
Lens for the `binding` field from a [[KeyExistsWithBindingClause]] record. See [[active.clojure.match/make-key-exists-with-binding-clause]].
(key-exists-with-binding-clause-key rec__3628__auto__)
(key-exists-with-binding-clause-key data__3629__auto__ v__3630__auto__)
Lens for the key
field from a [[KeyExistsWithBindingClause]] record. See active.clojure.match/make-key-exists-with-binding-clause
.
Lens for the `key` field from a [[KeyExistsWithBindingClause]] record. See [[active.clojure.match/make-key-exists-with-binding-clause]].
(key-exists-with-binding-clause? thing)
Is object a KeyExistsWithBindingClause
record? See active.clojure.match/make-key-exists-with-binding-clause
.
Is object a `KeyExistsWithBindingClause` record? See [[active.clojure.match/make-key-exists-with-binding-clause]].
(key-exists-without-binding-clause key)
Returns a clause that asserts the existence of a non-nil value at key
.
Returns a clause that asserts the existence of a non-nil value at `key`.
(key-exists-without-binding-clause-key rec__3628__auto__)
(key-exists-without-binding-clause-key data__3629__auto__ v__3630__auto__)
Lens for the key
field from a [[KeyExistsWithoutBindingClause]] record. See active.clojure.match/make-key-exists-without-binding-clause
.
Lens for the `key` field from a [[KeyExistsWithoutBindingClause]] record. See [[active.clojure.match/make-key-exists-without-binding-clause]].
(key-exists-without-binding-clause? thing)
Is object a KeyExistsWithoutBindingClause
record? See active.clojure.match/make-key-exists-without-binding-clause
.
Is object a `KeyExistsWithoutBindingClause` record? See [[active.clojure.match/make-key-exists-without-binding-clause]].
(key-matches-with-binding-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-with-binding-clause->rhs-match message clause)
(key-matches-with-binding-clause-binding rec__3628__auto__)
(key-matches-with-binding-clause-binding data__3629__auto__ v__3630__auto__)
Lens for the binding
field from a [[KeyMatchesWithBindingClause]] record. See active.clojure.match/make-key-matches-with-binding-clause
.
Lens for the `binding` field from a [[KeyMatchesWithBindingClause]] record. See [[active.clojure.match/make-key-matches-with-binding-clause]].
(key-matches-with-binding-clause-key rec__3628__auto__)
(key-matches-with-binding-clause-key data__3629__auto__ v__3630__auto__)
Lens for the key
field from a [[KeyMatchesWithBindingClause]] record. See active.clojure.match/make-key-matches-with-binding-clause
.
Lens for the `key` field from a [[KeyMatchesWithBindingClause]] record. See [[active.clojure.match/make-key-matches-with-binding-clause]].
(key-matches-with-binding-clause-matcher rec__3628__auto__)
(key-matches-with-binding-clause-matcher data__3629__auto__ v__3630__auto__)
Lens for the matcher
field from a [[KeyMatchesWithBindingClause]] record. See active.clojure.match/make-key-matches-with-binding-clause
.
Lens for the `matcher` field from a [[KeyMatchesWithBindingClause]] record. See [[active.clojure.match/make-key-matches-with-binding-clause]].
(key-matches-with-binding-clause? thing)
Is object a KeyMatchesWithBindingClause
record? See active.clojure.match/make-key-matches-with-binding-clause
.
Is object a `KeyMatchesWithBindingClause` record? See [[active.clojure.match/make-key-matches-with-binding-clause]].
(key-matches-without-binding-clause key matcher)
Returns a clause that matches a key
with a certain matcher
.
Returns a clause that matches a `key` with a certain `matcher`.
(key-matches-without-binding-clause-key rec__3628__auto__)
(key-matches-without-binding-clause-key data__3629__auto__ v__3630__auto__)
Lens for the key
field from a [[KeyMatchesWithoutBindingClause]] record. See active.clojure.match/make-key-matches-without-binding-clause
.
Lens for the `key` field from a [[KeyMatchesWithoutBindingClause]] record. See [[active.clojure.match/make-key-matches-without-binding-clause]].
(key-matches-without-binding-clause-matcher rec__3628__auto__)
(key-matches-without-binding-clause-matcher data__3629__auto__ v__3630__auto__)
Lens for the matcher
field from a [[KeyMatchesWithoutBindingClause]] record. See active.clojure.match/make-key-matches-without-binding-clause
.
Lens for the `matcher` field from a [[KeyMatchesWithoutBindingClause]] record. See [[active.clojure.match/make-key-matches-without-binding-clause]].
(key-matches-without-binding-clause? thing)
Is object a KeyMatchesWithoutBindingClause
record? See active.clojure.match/make-key-matches-without-binding-clause
.
Is object a `KeyMatchesWithoutBindingClause` record? See [[active.clojure.match/make-key-matches-without-binding-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-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-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-with-binding-clause key binding)
Construct a KeyExistsWithBindingClause
record.
key
: access via active.clojure.match/key-exists-with-binding-clause-key
binding
: access via active.clojure.match/key-exists-with-binding-clause-binding
Construct a `KeyExistsWithBindingClause` record. `key`: access via [[active.clojure.match/key-exists-with-binding-clause-key]] `binding`: access via [[active.clojure.match/key-exists-with-binding-clause-binding]]
(make-key-exists-without-binding-clause key)
Construct a KeyExistsWithoutBindingClause
record.
key
: access via active.clojure.match/key-exists-without-binding-clause-key
Construct a `KeyExistsWithoutBindingClause` record. `key`: access via [[active.clojure.match/key-exists-without-binding-clause-key]]
(make-key-matches-with-binding-clause key matcher binding)
Construct a KeyMatchesWithBindingClause
record.
key
: access via active.clojure.match/key-matches-with-binding-clause-key
matcher
: access via active.clojure.match/key-matches-with-binding-clause-matcher
binding
: access via active.clojure.match/key-matches-with-binding-clause-binding
Construct a `KeyMatchesWithBindingClause` record. `key`: access via [[active.clojure.match/key-matches-with-binding-clause-key]] `matcher`: access via [[active.clojure.match/key-matches-with-binding-clause-matcher]] `binding`: access via [[active.clojure.match/key-matches-with-binding-clause-binding]]
(make-key-matches-without-binding-clause key matcher)
Construct a KeyMatchesWithoutBindingClause
record.
key
: access via active.clojure.match/key-matches-without-binding-clause-key
matcher
: access via active.clojure.match/key-matches-without-binding-clause-matcher
Construct a `KeyMatchesWithoutBindingClause` record. `key`: access via [[active.clojure.match/key-matches-without-binding-clause-key]] `matcher`: access via [[active.clojure.match/key-matches-without-binding-clause-matcher]]
(make-optional-key-exists-with-binding-clause key binding)
Construct a OptionalKeyExistsWithBindingClause
record.
key
: access via active.clojure.match/optional-key-exists-with-binding-clause-key
binding
: access via active.clojure.match/optional-key-exists-with-binding-clause-binding
Construct a `OptionalKeyExistsWithBindingClause` record. `key`: access via [[active.clojure.match/optional-key-exists-with-binding-clause-key]] `binding`: access via [[active.clojure.match/optional-key-exists-with-binding-clause-binding]]
(make-optional-key-with-default-binding-clause key default-value binding)
Construct a OptionalKeyWithDefaultBindingClause
record.
key
: access via active.clojure.match/optional-key-with-default-binding-clause-key
default-value
: access via active.clojure.match/optional-key-with-default-binding-clause-default-value
binding
: access via active.clojure.match/optional-key-with-default-binding-clause-binding
Construct a `OptionalKeyWithDefaultBindingClause` record. `key`: access via [[active.clojure.match/optional-key-with-default-binding-clause-key]] `default-value`: access via [[active.clojure.match/optional-key-with-default-binding-clause-default-value]] `binding`: access via [[active.clojure.match/optional-key-with-default-binding-clause-binding]]
(make-optional-path-exists-with-binding-clause path binding)
Construct a OptionalPathExistsWithBindingClause
record.
path
: access via active.clojure.match/optional-path-exists-with-binding-clause-path
binding
: access via active.clojure.match/optional-path-exists-with-binding-clause-binding
Construct a `OptionalPathExistsWithBindingClause` record. `path`: access via [[active.clojure.match/optional-path-exists-with-binding-clause-path]] `binding`: access via [[active.clojure.match/optional-path-exists-with-binding-clause-binding]]
(make-optional-path-with-default-binding-clause path default-value binding)
Construct a OptionalPathWithDefaultBindingClause
record.
path
: access via active.clojure.match/optional-path-with-default-binding-clause-path
default-value
: access via active.clojure.match/optional-path-with-default-binding-clause-default-value
binding
: access via active.clojure.match/optional-path-with-default-binding-clause-binding
Construct a `OptionalPathWithDefaultBindingClause` record. `path`: access via [[active.clojure.match/optional-path-with-default-binding-clause-path]] `default-value`: access via [[active.clojure.match/optional-path-with-default-binding-clause-default-value]] `binding`: access via [[active.clojure.match/optional-path-with-default-binding-clause-binding]]
(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-with-binding-clause path binding)
Construct a PathExistsWithBindingClause
record.
path
: access via active.clojure.match/path-exists-with-binding-clause-path
binding
: access via active.clojure.match/path-exists-with-binding-clause-binding
Construct a `PathExistsWithBindingClause` record. `path`: access via [[active.clojure.match/path-exists-with-binding-clause-path]] `binding`: access via [[active.clojure.match/path-exists-with-binding-clause-binding]]
(make-path-exists-without-binding-clause path)
Construct a PathExistsWithoutBindingClause
record.
path
: access via active.clojure.match/path-exists-without-binding-clause-path
Construct a `PathExistsWithoutBindingClause` record. `path`: access via [[active.clojure.match/path-exists-without-binding-clause-path]]
(make-path-matches-with-binding-clause path matcher binding)
Construct a PathMatchesWithBindingClause
record.
path
: access via active.clojure.match/path-matches-with-binding-clause-path
matcher
: access via active.clojure.match/path-matches-with-binding-clause-matcher
binding
: access via active.clojure.match/path-matches-with-binding-clause-binding
Construct a `PathMatchesWithBindingClause` record. `path`: access via [[active.clojure.match/path-matches-with-binding-clause-path]] `matcher`: access via [[active.clojure.match/path-matches-with-binding-clause-matcher]] `binding`: access via [[active.clojure.match/path-matches-with-binding-clause-binding]]
(make-path-matches-without-binding-clause path matcher)
Construct a PathMatchesWithoutBindingClause
record.
path
: access via active.clojure.match/path-matches-without-binding-clause-path
matcher
: access via active.clojure.match/path-matches-without-binding-clause-matcher
Construct a `PathMatchesWithoutBindingClause` record. `path`: access via [[active.clojure.match/path-matches-without-binding-clause-path]] `matcher`: access via [[active.clojure.match/path-matches-without-binding-clause-matcher]]
(make-pattern clauses)
Construct a Pattern
record.
clauses
: access via active.clojure.match/pattern-clauses
Construct a `Pattern` record. `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> <value>)
which requires the key <key>
to be mapped to <value>
in the map.
(<key> :as <name>)
which requires <key>
to be present in the map
and binds <name>
to its value.
<key>
which requires <key>
to be present in the map.
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> :as <name>)
binds <name>
to to the value of <key>
in the map or to nil
if <key>
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>
can be either a symbol or a keyword.
If <key>
is a symbol, it is converted to a string 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>
.
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 no <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 z)
[(:a "a" :as a)
(:b "b")
(:c :as c)
([:d] :as d)
([:d Z] 42 :as Z)
([:d Y] :as Y)
([:d X] 65)
[:d W foo]]
(println a c d Z Y)
:else false))
(example-map-matcher {:a "a" :b "b" :c "c"
:d {"Z" 42 "Y" 23 "X" 65
"W" {"foo" "bar"}}})
prints "a c {Z 42, Y 23, X 65, W {foo bar}} 42 23"
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> <value>)` which requires the key `<key>` to be mapped to `<value>` in the map. - `(<key> :as <name>)` which requires `<key>` to be present in the map and binds `<name>` to its value. - `<key>` which requires `<key>` to be present in the map. 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> :as <name>)` binds `<name>` to to the value of `<key>` in the map or to `nil` if `<key>` 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>` can be either a symbol or a keyword. If `<key>` is a symbol, it is converted to a string 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>`. `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 no `<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 z) [(:a "a" :as a) (:b "b") (:c :as c) ([:d] :as d) ([:d Z] 42 :as Z) ([:d Y] :as Y) ([:d X] 65) [:d W foo]] (println a c d Z Y) :else false)) (example-map-matcher {:a "a" :b "b" :c "c" :d {"Z" 42 "Y" 23 "X" 65 "W" {"foo" "bar"}}}) prints "a c {Z 42, Y 23, X 65, W {foo bar}} 42 23"
(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.
(optional-key-exists-with-binding-clause key bind)
Returns an optional clause that asserts the existence of a non-nil value at key
. When evaluated, binds it's result to binding
.
Returns an optional clause that asserts the existence of a non-nil value at `key`. When evaluated, binds it's result to `binding`.
(optional-key-exists-with-binding-clause->rhs-match message clause)
(optional-key-exists-with-binding-clause-binding rec__3628__auto__)
(optional-key-exists-with-binding-clause-binding data__3629__auto__
v__3630__auto__)
Lens for the binding
field from a [[OptionalKeyExistsWithBindingClause]] record. See active.clojure.match/make-optional-key-exists-with-binding-clause
.
Lens for the `binding` field from a [[OptionalKeyExistsWithBindingClause]] record. See [[active.clojure.match/make-optional-key-exists-with-binding-clause]].
(optional-key-exists-with-binding-clause-key rec__3628__auto__)
(optional-key-exists-with-binding-clause-key data__3629__auto__ v__3630__auto__)
Lens for the key
field from a [[OptionalKeyExistsWithBindingClause]] record. See active.clojure.match/make-optional-key-exists-with-binding-clause
.
Lens for the `key` field from a [[OptionalKeyExistsWithBindingClause]] record. See [[active.clojure.match/make-optional-key-exists-with-binding-clause]].
(optional-key-exists-with-binding-clause? thing)
Is object a OptionalKeyExistsWithBindingClause
record? See active.clojure.match/make-optional-key-exists-with-binding-clause
.
Is object a `OptionalKeyExistsWithBindingClause` record? See [[active.clojure.match/make-optional-key-exists-with-binding-clause]].
(optional-key-with-default-binding-clause key default-value bind)
Returns an optional clause that matches a key
, binding the
match to a symbol based on key
or the default-value
.
Returns an optional clause that matches a `key`, binding the match to a symbol based on `key` or the `default-value`.
(optional-key-with-default-binding-clause->rhs-match message clause)
(optional-key-with-default-binding-clause-binding rec__3628__auto__)
(optional-key-with-default-binding-clause-binding data__3629__auto__
v__3630__auto__)
Lens for the binding
field from a [[OptionalKeyWithDefaultBindingClause]] record. See active.clojure.match/make-optional-key-with-default-binding-clause
.
Lens for the `binding` field from a [[OptionalKeyWithDefaultBindingClause]] record. See [[active.clojure.match/make-optional-key-with-default-binding-clause]].
(optional-key-with-default-binding-clause-default-value rec__3628__auto__)
(optional-key-with-default-binding-clause-default-value data__3629__auto__
v__3630__auto__)
Lens for the default-value
field from a [[OptionalKeyWithDefaultBindingClause]] record. See active.clojure.match/make-optional-key-with-default-binding-clause
.
Lens for the `default-value` field from a [[OptionalKeyWithDefaultBindingClause]] record. See [[active.clojure.match/make-optional-key-with-default-binding-clause]].
(optional-key-with-default-binding-clause-key rec__3628__auto__)
(optional-key-with-default-binding-clause-key data__3629__auto__
v__3630__auto__)
Lens for the key
field from a [[OptionalKeyWithDefaultBindingClause]] record. See active.clojure.match/make-optional-key-with-default-binding-clause
.
Lens for the `key` field from a [[OptionalKeyWithDefaultBindingClause]] record. See [[active.clojure.match/make-optional-key-with-default-binding-clause]].
(optional-key-with-default-binding-clause? thing)
Is object a OptionalKeyWithDefaultBindingClause
record? See active.clojure.match/make-optional-key-with-default-binding-clause
.
Is object a `OptionalKeyWithDefaultBindingClause` record? See [[active.clojure.match/make-optional-key-with-default-binding-clause]].
(optional-path-exists-with-binding-clause path bind)
Returns an optional clause that asserts the existence of a non-nil value at path
. When evaluated, binds it's result to binding
.
Returns an optional clause that asserts the existence of a non-nil value at `path`. When evaluated, binds it's result to `binding`.
(optional-path-exists-with-binding-clause->rhs-match message clause)
(optional-path-exists-with-binding-clause-binding rec__3628__auto__)
(optional-path-exists-with-binding-clause-binding data__3629__auto__
v__3630__auto__)
Lens for the binding
field from a [[OptionalPathExistsWithBindingClause]] record. See active.clojure.match/make-optional-path-exists-with-binding-clause
.
Lens for the `binding` field from a [[OptionalPathExistsWithBindingClause]] record. See [[active.clojure.match/make-optional-path-exists-with-binding-clause]].
(optional-path-exists-with-binding-clause-path rec__3628__auto__)
(optional-path-exists-with-binding-clause-path data__3629__auto__
v__3630__auto__)
Lens for the path
field from a [[OptionalPathExistsWithBindingClause]] record. See active.clojure.match/make-optional-path-exists-with-binding-clause
.
Lens for the `path` field from a [[OptionalPathExistsWithBindingClause]] record. See [[active.clojure.match/make-optional-path-exists-with-binding-clause]].
(optional-path-exists-with-binding-clause? thing)
Is object a OptionalPathExistsWithBindingClause
record? See active.clojure.match/make-optional-path-exists-with-binding-clause
.
Is object a `OptionalPathExistsWithBindingClause` record? See [[active.clojure.match/make-optional-path-exists-with-binding-clause]].
(optional-path-with-default-binding-clause path default-value bind)
Returns an optional clause that matches a path
, binding the
match to a symbol based on path
or the default-value
.
Returns an optional clause that matches a `path`, binding the match to a symbol based on `path` or the `default-value`.
(optional-path-with-default-binding-clause->rhs-match message clause)
(optional-path-with-default-binding-clause-binding rec__3628__auto__)
(optional-path-with-default-binding-clause-binding data__3629__auto__
v__3630__auto__)
Lens for the binding
field from a [[OptionalPathWithDefaultBindingClause]] record. See active.clojure.match/make-optional-path-with-default-binding-clause
.
Lens for the `binding` field from a [[OptionalPathWithDefaultBindingClause]] record. See [[active.clojure.match/make-optional-path-with-default-binding-clause]].
(optional-path-with-default-binding-clause-default-value rec__3628__auto__)
(optional-path-with-default-binding-clause-default-value data__3629__auto__
v__3630__auto__)
Lens for the default-value
field from a [[OptionalPathWithDefaultBindingClause]] record. See active.clojure.match/make-optional-path-with-default-binding-clause
.
Lens for the `default-value` field from a [[OptionalPathWithDefaultBindingClause]] record. See [[active.clojure.match/make-optional-path-with-default-binding-clause]].
(optional-path-with-default-binding-clause-path rec__3628__auto__)
(optional-path-with-default-binding-clause-path data__3629__auto__
v__3630__auto__)
Lens for the path
field from a [[OptionalPathWithDefaultBindingClause]] record. See active.clojure.match/make-optional-path-with-default-binding-clause
.
Lens for the `path` field from a [[OptionalPathWithDefaultBindingClause]] record. See [[active.clojure.match/make-optional-path-with-default-binding-clause]].
(optional-path-with-default-binding-clause? thing)
Is object a OptionalPathWithDefaultBindingClause
record? See active.clojure.match/make-optional-path-with-default-binding-clause
.
Is object a `OptionalPathWithDefaultBindingClause` record? See [[active.clojure.match/make-optional-path-with-default-binding-clause]].
(options-matcher-options rec__3628__auto__)
(options-matcher-options data__3629__auto__ v__3630__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]].
Parse the argument to `defpattern` as a [[Pattern]].
(path-exists-with-binding-clause path bind)
Returns a clause that asserts the existence of a non-nil value at path
. When evaluated, binds it's result to binding
.
Returns a clause that asserts the existence of a non-nil value at `path`. When evaluated, binds it's result to `binding`.
(path-exists-with-binding-clause->rhs-match message clause)
(path-exists-with-binding-clause-binding rec__3628__auto__)
(path-exists-with-binding-clause-binding data__3629__auto__ v__3630__auto__)
Lens for the binding
field from a [[PathExistsWithBindingClause]] record. See active.clojure.match/make-path-exists-with-binding-clause
.
Lens for the `binding` field from a [[PathExistsWithBindingClause]] record. See [[active.clojure.match/make-path-exists-with-binding-clause]].
(path-exists-with-binding-clause-path rec__3628__auto__)
(path-exists-with-binding-clause-path data__3629__auto__ v__3630__auto__)
Lens for the path
field from a [[PathExistsWithBindingClause]] record. See active.clojure.match/make-path-exists-with-binding-clause
.
Lens for the `path` field from a [[PathExistsWithBindingClause]] record. See [[active.clojure.match/make-path-exists-with-binding-clause]].
(path-exists-with-binding-clause? thing)
Is object a PathExistsWithBindingClause
record? See active.clojure.match/make-path-exists-with-binding-clause
.
Is object a `PathExistsWithBindingClause` record? See [[active.clojure.match/make-path-exists-with-binding-clause]].
(path-exists-without-binding-clause path)
Returns a clause that asserts the existence of a non-nil value at path
.
Returns a clause that asserts the existence of a non-nil value at `path`.
(path-exists-without-binding-clause-path rec__3628__auto__)
(path-exists-without-binding-clause-path data__3629__auto__ v__3630__auto__)
Lens for the path
field from a [[PathExistsWithoutBindingClause]] record. See active.clojure.match/make-path-exists-without-binding-clause
.
Lens for the `path` field from a [[PathExistsWithoutBindingClause]] record. See [[active.clojure.match/make-path-exists-without-binding-clause]].
(path-exists-without-binding-clause? thing)
Is object a PathExistsWithoutBindingClause
record? See active.clojure.match/make-path-exists-without-binding-clause
.
Is object a `PathExistsWithoutBindingClause` record? See [[active.clojure.match/make-path-exists-without-binding-clause]].
(path-matches-with-binding-clause path matcher bind)
Returns a clause that matches a path
with a certain matcher
, binding the
match to a symbol based on path
.
Returns a clause that matches a `path` with a certain `matcher`, binding the match to a symbol based on `path`.
(path-matches-with-binding-clause->rhs-match message clause)
(path-matches-with-binding-clause-binding rec__3628__auto__)
(path-matches-with-binding-clause-binding data__3629__auto__ v__3630__auto__)
Lens for the binding
field from a [[PathMatchesWithBindingClause]] record. See active.clojure.match/make-path-matches-with-binding-clause
.
Lens for the `binding` field from a [[PathMatchesWithBindingClause]] record. See [[active.clojure.match/make-path-matches-with-binding-clause]].
(path-matches-with-binding-clause-matcher rec__3628__auto__)
(path-matches-with-binding-clause-matcher data__3629__auto__ v__3630__auto__)
Lens for the matcher
field from a [[PathMatchesWithBindingClause]] record. See active.clojure.match/make-path-matches-with-binding-clause
.
Lens for the `matcher` field from a [[PathMatchesWithBindingClause]] record. See [[active.clojure.match/make-path-matches-with-binding-clause]].
(path-matches-with-binding-clause-path rec__3628__auto__)
(path-matches-with-binding-clause-path data__3629__auto__ v__3630__auto__)
Lens for the path
field from a [[PathMatchesWithBindingClause]] record. See active.clojure.match/make-path-matches-with-binding-clause
.
Lens for the `path` field from a [[PathMatchesWithBindingClause]] record. See [[active.clojure.match/make-path-matches-with-binding-clause]].
(path-matches-with-binding-clause? thing)
Is object a PathMatchesWithBindingClause
record? See active.clojure.match/make-path-matches-with-binding-clause
.
Is object a `PathMatchesWithBindingClause` record? See [[active.clojure.match/make-path-matches-with-binding-clause]].
(path-matches-without-binding-clause path matcher)
Returns a clause that matches a path
with a certain matcher
.
Returns a clause that matches a `path` with a certain `matcher`.
(path-matches-without-binding-clause-matcher rec__3628__auto__)
(path-matches-without-binding-clause-matcher data__3629__auto__ v__3630__auto__)
Lens for the matcher
field from a [[PathMatchesWithoutBindingClause]] record. See active.clojure.match/make-path-matches-without-binding-clause
.
Lens for the `matcher` field from a [[PathMatchesWithoutBindingClause]] record. See [[active.clojure.match/make-path-matches-without-binding-clause]].
(path-matches-without-binding-clause-path rec__3628__auto__)
(path-matches-without-binding-clause-path data__3629__auto__ v__3630__auto__)
Lens for the path
field from a [[PathMatchesWithoutBindingClause]] record. See active.clojure.match/make-path-matches-without-binding-clause
.
Lens for the `path` field from a [[PathMatchesWithoutBindingClause]] record. See [[active.clojure.match/make-path-matches-without-binding-clause]].
(path-matches-without-binding-clause? thing)
Is object a PathMatchesWithoutBindingClause
record? See active.clojure.match/make-path-matches-without-binding-clause
.
Is object a `PathMatchesWithoutBindingClause` record? See [[active.clojure.match/make-path-matches-without-binding-clause]].
(pattern & clauses)
Takes some clauses
and returns a [[Pattern]].
Takes some `clauses` and returns a [[Pattern]].
(pattern-clauses rec__3628__auto__)
(pattern-clauses data__3629__auto__ v__3630__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? 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__3628__auto__)
(predicate-matcher-predicate data__3629__auto__ v__3630__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__3628__auto__)
(regex-matcher-regex data__3629__auto__ v__3630__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]].
(valid-symbol? s)
Is a thing a valid symbol?
Is a thing a valid symbol?
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close