Liking cljdoc? Tell your friends :D

plumbing.fnk.impl

Core utilities for parsing our 'fnk'-style binding syntax. Documented and tested through the actual 'letk','fnk', and 'defnk' macros in plumbing.core.

The core entry points into this namespace are 'letk*' and 'fnk*', which parse the new binding syntax and generate fnk bodies, respectively.

For efficiency, two different methods of generating fnk bodies are used. If the fnk takes a fixed set of arguments (i.e., no & or :as), then a 'positional' version of the fnk that is called like an ordinary Clojure fn (e.g., (f a b) rather than (f {:a a :b b}) is generated as an implementation detail, and stored in metadata of the actual keyword fnk (which is just a thin wrapper around the positional version). If '& or :as are used, no such positional function is generated.

The advantage of these 'positional' functions is that they can be accessed using 'efficient-call-forms' or 'positional-fn' to call the fnk without incurring the overhead of producing and then destructuring a top-level map. See plumbing.graph.positional for an example use.

Core utilities for parsing our 'fnk'-style binding syntax.
Documented and tested through the actual 'letk','fnk', and 'defnk'
macros in plumbing.core.

The core entry points into this namespace are 'letk*' and 'fnk*',
which parse the new binding syntax and generate fnk bodies,
respectively.

For efficiency, two different methods of generating fnk bodies are
used.  If the fnk takes a fixed set of arguments (i.e., no & or
:as), then a 'positional' version of the fnk that is called like an
ordinary Clojure fn (e.g., (f a b) rather than (f {:a a :b b}) is
generated as an implementation detail, and stored in metadata of
the actual keyword fnk (which is just a thin wrapper around the
positional version).  If '& or :as are used, no such positional
function is generated.

The advantage of these 'positional' functions is that they can be
accessed using 'efficient-call-forms' or 'positional-fn' to call
the fnk without incurring the overhead of producing and then
destructuring a top-level map.  See plumbing.graph.positional for
an example use.
raw docstring

plumbing.fnk.pfnk

Core protocol and helpers for schema.core to extract and attach input and output schemas to fnks. This protocol says nothing about how fnks are created, so users are free to create PFnks directly using fn->fnk, or using custom binding syntax (of which 'fnk' et al are one possible example).

Core protocol and helpers for schema.core to extract and attach
input and output schemas to fnks. This protocol says nothing about
how fnks are created, so users are free to create PFnks directly
using fn->fnk, or using custom binding syntax (of which 'fnk' et al
are one possible example).
raw docstring

plumbing.fnk.schema

A very simple type system for a subset of schemas consisting of nested maps with optional or required keyword keys; used by fnk and kin.

Since schemas are turing-complete and not really designed for type inference, (and for simplicity) we err on the side of completeness (allowing all legal programs) at the cost of soundness.

These operations also bake in some logic specific to reasoning about Graphs, namely that all input keys to a node must be explicitly mentioned as optional or required, or provided via instance, and will thus deliberately drop extra key schemas on inputs as appropriate. Output schemas may not have optional keys.

A very simple type system for a subset of schemas consisting of nested
maps with optional or required keyword keys; used by fnk and kin.

Since schemas are turing-complete and not really designed for type inference,
(and for simplicity) we err on the side of completeness (allowing all legal programs)
at the cost of soundness.

These operations also bake in some logic specific to reasoning about Graphs,
namely that all input keys to a node must be explicitly mentioned as optional or
required, or provided via `instance`, and will thus deliberately drop extra key
schemas on inputs as appropriate.  Output schemas may not have optional keys.
raw docstring

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

× close