Liking cljdoc? Tell your friends :D
Clojure only.

active.clojure.match

Syntactic sugar for map matching around core.match.

Syntactic sugar for map matching around `core.match`.
raw docstring

any-butclj

(any-but & exclusions)
source

bind-matchclj

(bind-match clause binding)

Takes a clause and replaces it's binding with binding.

Takes a clause and replaces it's binding with `binding`.
sourceraw docstring

binding-lensclj

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.
sourceraw docstring

clause->dependencyclj

(clause->dependency pattern clause)
source

clause->lhsclj

(clause->lhs message clause)
source

clause->rhsclj

(clause->rhs message bindings clause)
source

clause-lensclj

(clause-lens key-matches-lens
             path-matches-lens
             key-exists-lens
             path-exists-lens)
source

clause?clj

source

composition->dependenciesclj

(composition->dependencies composition)
source

conjunctionclj

(conjunction composition & compositions)
source

Conjunctionclj

source

conjunction-comp-1clj

(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]].
sourceraw docstring

conjunction-comp-2clj

(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]].
sourceraw docstring

conjunction?clj

(conjunction? thing)

Is object a Conjunction record? See active.clojure.match/make-conjunction.

Is object a `Conjunction` record? See [[active.clojure.match/make-conjunction]].
sourceraw docstring

constant-matcher-valueclj

(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]].
sourceraw docstring

constant-matcher?clj

(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]].
sourceraw docstring

ConstantMatcherclj

source

convert-path-elementclj

(convert-path-element path-element)
source

deep-mergeclj

(deep-merge v & vs)
source

defpatterncljmacro

(defpattern binding pattern)
source

dependencies->graphclj

(dependencies->graph dependencies)
source

Dependencyclj

source

dependency-for-patternclj

(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]].
sourceraw docstring

dependency-matcherclj

(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]].
sourceraw docstring

dependency-pathclj

(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]].
sourceraw docstring

dependency?clj

(dependency? thing)

Is object a Dependency record? See active.clojure.match/make-dependency.

Is object a `Dependency` record? See [[active.clojure.match/make-dependency]].
sourceraw docstring

disjuctionclj

(disjuction composition & compositions)
source

Disjunctionclj

source

disjunction-comp-1clj

(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]].
sourceraw docstring

disjunction-comp-2clj

(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]].
sourceraw docstring

disjunction?clj

(disjunction? thing)

Is object a Disjunction record? See active.clojure.match/make-disjunction.

Is object a `Disjunction` record? See [[active.clojure.match/make-disjunction]].
sourceraw docstring

existence-matcher?clj

(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]].
sourceraw docstring

ExistenceMatcherclj

source

flat?clj

source

fold-pathclj

(fold-path path match)
source

key->symclj

source

key-exists-clauseclj

(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)`.
sourceraw docstring

key-exists-clause->rhs-matchclj

(key-exists-clause->rhs-match message clause)
source

key-exists-clause-bindingclj

(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]].
sourceraw docstring

key-exists-clause-keyclj

(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]].
sourceraw docstring

key-exists-clause-matcherclj

(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]].
sourceraw docstring

key-exists-clause?clj

(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]].
sourceraw docstring

key-matches-clauseclj

(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`.
sourceraw docstring

key-matches-clause->rhs-matchclj

(key-matches-clause->rhs-match message clause)
source

key-matches-clause-bindingclj

(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]].
sourceraw docstring

key-matches-clause-keyclj

(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]].
sourceraw docstring

key-matches-clause-matcherclj

(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]].
sourceraw docstring

key-matches-clause?clj

(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]].
sourceraw docstring

KeyExistsClauseclj

source

KeyMatchesClauseclj

source

make-bindingclj

(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.
sourceraw docstring

make-conjunctionclj

(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]]
sourceraw docstring

make-constant-matcherclj

(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]]
sourceraw docstring

make-dependencyclj

(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]]
sourceraw docstring

make-disjunctionclj

(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]]
sourceraw docstring

make-existence-matcherclj

(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.
sourceraw docstring

make-keyclj

(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.
sourceraw docstring

make-key-exists-clauseclj

(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]]
sourceraw docstring

make-key-matches-clauseclj

(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]]
sourceraw docstring

make-optional-clauseclj

(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]]
sourceraw docstring

make-options-matcherclj

(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]]
sourceraw docstring

make-path-exists-clauseclj

(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]]
sourceraw docstring

make-path-matches-clauseclj

(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]]
sourceraw docstring

make-patternclj

(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]]
sourceraw docstring

make-predicate-matcherclj

(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]]
sourceraw docstring

make-regex-matcherclj

(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]]
sourceraw docstring

map-matchercljmacro

(map-matcher & args)

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"

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"
sourceraw docstring

matchcljmacro

(match event & args)
source

match-constclj

(match-const value)
source

match-optionsclj

(match-options options)
source

match-predicateclj

(match-predicate p)
source

match-regexclj

(match-regex regex)
source

match-value->matcherclj

(match-value->matcher [kind match-value])
source

matchercljmacro

(matcher & args)
source

matcher->valueclj

(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.
sourceraw docstring

matcher-default-valueclj

(matcher-default-value matcher)

Returns the default value of a matcher, if any.

Returns the default value of a matcher, if any.
sourceraw docstring

matcher-lensclj

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.
sourceraw docstring

matcher?clj

source

named-patternclj

(named-pattern pattern the-name)
source

optionalclj

(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.
sourceraw docstring

optional-clause-clauseclj

(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]].
sourceraw docstring

optional-clause?clj

(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]].
sourceraw docstring

optional?clj

source

OptionalClauseclj

source

options-matcher-optionsclj

(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]].
sourceraw docstring

options-matcher?clj

(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]].
sourceraw docstring

OptionsMatcherclj

source

parse-clausecljmacro

(parse-clause p)
source

parse-clausescljmacro

(parse-clauses cs)
source

parse-emit-match-syntaxclj

(parse-emit-match-syntax message [pattern rhs])
source

parse-emit-syntaxclj

(parse-emit-syntax message p rhs)
source

parse-patterncljmacro

(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.
sourceraw docstring

path-exists-clauseclj

(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))`.
sourceraw docstring

path-exists-clause->rhs-matchclj

(path-exists-clause->rhs-match message clause)
source

path-exists-clause-bindingclj

(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]].
sourceraw docstring

path-exists-clause-matcherclj

(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]].
sourceraw docstring

path-exists-clause-pathclj

(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]].
sourceraw docstring

path-exists-clause?clj

(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]].
sourceraw docstring

path-lensclj

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.
sourceraw docstring

path-matches-clauseclj

(path-matches-clause path matcher bind)
source

path-matches-clause->rhs-matchclj

(path-matches-clause->rhs-match message clause)
source

path-matches-clause-bindingclj

(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]].
sourceraw docstring

path-matches-clause-matcherclj

(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]].
sourceraw docstring

path-matches-clause-pathclj

(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]].
sourceraw docstring

path-matches-clause?clj

(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]].
sourceraw docstring

path?clj

Is something a valid path?

Is something a valid path?
sourceraw docstring

PathExistsClauseclj

source

PathMatchesClauseclj

source

Patternclj

source

patternclj

(pattern & clauses)

Takes a name and some clauses and returns a Pattern.

Takes a name and some `clauses` and returns a [[Pattern]].
sourceraw docstring

pattern->dependenciesclj

(pattern->dependencies pattern)
source

pattern->lhsclj

(pattern->lhs message pattern)
source

pattern->rhsclj

(pattern->rhs message pattern rhs)
source

pattern-clausesclj

(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]].
sourceraw docstring

pattern-nameclj

(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]].
sourceraw docstring

pattern?clj

(pattern? thing)

Is object a Pattern record? See active.clojure.match/make-pattern.

Is object a `Pattern` record? See [[active.clojure.match/make-pattern]].
sourceraw docstring

predicate-matcher-predicateclj

(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]].
sourceraw docstring

predicate-matcher?clj

(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]].
sourceraw docstring

PredicateMatcherclj

source

reduce-lhsclj

(reduce-lhs lhss)
source

regex-matcher-regexclj

(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]].
sourceraw docstring

regex-matcher?clj

(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]].
sourceraw docstring

regex?clj

(regex? thing)

Is a thing a regex.

Is a `thing` a regex.
sourceraw docstring

RegexMatcherclj

source

the-existence-matcherclj

Singleton matcher. Match the existence of a vale.

Singleton matcher. Match the existence of a vale.
sourceraw docstring

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

× close