as input. This macro is generally used in conjunction with [[fixed-pathed-nav]]
or [[variable-pathed-nav]]. When inline factoring is applied to a path containing
one of these higher order navigators, it will automatically interepret all
arguments as paths, factor them accordingly, and set up the callsite to
provide the parameters dynamically. Use ^:notpath metadata on arguments
to indicate non-path arguments that should not be factored –note that in order
to be inline factorable, these arguments must be statically resolvable (e.g. a
top level var). See `transformed` for an example.</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L360">view source</a></div></div><divclass="public anchor"id="var-defprotocolpath"><h3>defprotocolpath</h3><h4class="type">macro</h4><divclass="usage"><code>(defprotocolpath name)</code><code>(defprotocolpath name params)</code></div><divclass="doc"><preclass="plaintext">Defines a navigator that chooses the path to take based on the type
of the value at the current point. May be specified with parameters to
specify that all extensions must require that number of parameters.
Currently not available for ClojureScript.
Example of usage:
(defrecord SingleAccount [funds])
(defrecord FamilyAccount [single-accounts])
(defprotocolpath FundsPath)
(extend-protocolpath FundsPath
SingleAccount :funds
FamilyAccount [ALL FundsPath]
)
</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L212">view source</a></div></div><divclass="public anchor"id="var-extend-protocolpath"><h3>extend-protocolpath</h3><h4class="type">macro</h4><divclass="usage"><code>(extend-protocolpath protpath & extensions)</code></div><divclass="doc"><preclass="plaintext">Used in conjunction with `defprotocolpath`. See [[defprotocolpath]].
</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L329">view source</a></div></div><divclass="public anchor"id="var-fixed-pathed-nav"><h3>fixed-pathed-nav</h3><h4class="type">macro</h4><divclass="usage"><code>(fixed-pathed-nav bindings impl1 impl2)</code></div><divclass="doc"><preclass="plaintext">This helper is used to define navigators that take in a fixed number of other
are required, then the result is executable.</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L155">view source</a></div></div><divclass="public anchor"id="var-nav"><h3>nav</h3><h4class="type">macro</h4><divclass="usage"><code>(nav params impl1 impl2)</code></div><divclass="doc"><preclass="plaintext">Defines a navigator with late bound parameters. This navigator can be precompiled
that needed parameters (in the order in which they were declared).</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L115">view source</a></div></div><divclass="public anchor"id="var-paramscollector"><h3>paramscollector</h3><h4class="type">macro</h4><divclass="usage"><code>(paramscollector params impl)</code></div><divclass="doc"><preclass="plaintext">Defines a Collector with late bound parameters. This collector can be precompiled
</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L137">view source</a></div></div><divclass="public anchor"id="var-paramsfn"><h3>paramsfn</h3><h4class="type">macro</h4><divclass="usage"><code>(paramsfn params [structure-sym] & impl)</code></div><divclass="doc"><preclass="plaintext"></pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L126">view source</a></div></div><divclass="public anchor"id="var-path"><h3>path</h3><h4class="type">macro</h4><divclass="usage"><code>(path & path)</code></div><divclass="doc"><preclass="plaintext">Same as calling comp-paths, except it caches the composition of the static part
select/transform/setval/replace-in/etc. macros.</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L447">view source</a></div></div><divclass="public anchor"id="var-pathed-collector"><h3>pathed-collector</h3><h4class="type">macro</h4><divclass="usage"><code>(pathed-collector [name path] impl)</code></div><divclass="doc"><preclass="plaintext">This helper is used to define collectors that take in a single selector
are required, then the result is executable.</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L191">view source</a></div></div><divclass="public anchor"id="var-providepath"><h3>providepath</h3><h4class="type">macro</h4><divclass="usage"><code>(providepath name apath)</code></div><divclass="doc"><preclass="plaintext"></pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L316">view source</a></div></div><divclass="public anchor"id="var-replace-in"><h3>replace-in</h3><h4class="type">macro</h4><divclass="usage"><code>(replace-in apath transform-fn structure & args)</code></div><divclass="doc"><preclass="plaintext">Similar to transform, except returns a pair of [transformed-structure sequence-of-user-ret].
The transform-fn in this case is expected to return [ret user-ret]. ret is
what's used to transform the data structure, while user-ret will be added to the user-ret sequence
in the final return. replace-in is useful for situations where you need to know the specific values
of what was transformed in the data structure.
This macro will attempt to do inline factoring and caching of the path, falling
back to compiling the path on every invocation it it's not possible to
factor/cache the path.</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L576">view source</a></div></div><divclass="public anchor"id="var-select"><h3>select</h3><h4class="type">macro</h4><divclass="usage"><code>(select apath structure)</code></div><divclass="doc"><preclass="plaintext">Navigates to and returns a sequence of all the elements specified by the path.
This macro will attempt to do inline factoring and caching of the path, falling
back to compiling the path on every invocation it it's not possible to
factor/cache the path.</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L527">view source</a></div></div><divclass="public anchor"id="var-select-first"><h3>select-first</h3><h4class="type">macro</h4><divclass="usage"><code>(select-first apath structure)</code></div><divclass="doc"><preclass="plaintext">Returns first element found. Not any more efficient than select, just a convenience.
This macro will attempt to do inline factoring and caching of the path, falling
back to compiling the path on every invocation it it's not possible to
factor/cache the path.</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L551">view source</a></div></div><divclass="public anchor"id="var-select-one"><h3>select-one</h3><h4class="type">macro</h4><divclass="usage"><code>(select-one apath structure)</code></div><divclass="doc"><preclass="plaintext">Like select, but returns either one element or nil. Throws exception if multiple elements found.
This macro will attempt to do inline factoring and caching of the path, falling
back to compiling the path on every invocation it it's not possible to
factor/cache the path.</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L543">view source</a></div></div><divclass="public anchor"id="var-select-one.21"><h3>select-one!</h3><h4class="type">macro</h4><divclass="usage"><code>(select-one! apath structure)</code></div><divclass="doc"><preclass="plaintext">Returns exactly one element, throws exception if zero or multiple elements found.
This macro will attempt to do inline factoring and caching of the path, falling
back to compiling the path on every invocation it it's not possible to
factor/cache the path.</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L535">view source</a></div></div><divclass="public anchor"id="var-setval"><h3>setval</h3><h4class="type">macro</h4><divclass="usage"><code>(setval apath aval structure)</code></div><divclass="doc"><preclass="plaintext">Navigates to each value specified by the path and replaces it by `aval`.
This macro will attempt to do inline factoring and caching of the path, falling
back to compiling the path on every invocation it it's not possible to
factor/cache the path.</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L568">view source</a></div></div><divclass="public anchor"id="var-transform"><h3>transform</h3><h4class="type">macro</h4><divclass="usage"><code>(transform apath transform-fn structure)</code></div><divclass="doc"><preclass="plaintext">Navigates to each value specified by the path and replaces it by the result of running
the transform-fn on it.
This macro will attempt to do inline factoring and caching of the path, falling
back to compiling the path on every invocation it it's not possible to
factor/cache the path.</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L559">view source</a></div></div><divclass="public anchor"id="var-variable-pathed-nav"><h3>variable-pathed-nav</h3><h4class="type">macro</h4><divclass="usage"><code>(variable-pathed-nav [latepaths-seq-sym paths-seq] impl1 impl2)</code></div><divclass="doc"><preclass="plaintext">This helper is used to define navigators that take in a variable number of other
are required, then the result is executable.</pre></div><divclass="src-link"><ahref="https://github.com/nathanmarz/specter/tree/0.11.1/src/clj/com/rpl/specter/macros.clj#L174">view source</a></div></div></div></body></html>