Base infrastructure for script generation, and operating system abstraction.
defscript
defines an abstract script function, that can be implemented
for different operating system (and version) targets.
implement
is used to add an implementation to a function defined with
defscript
.
Dispatch of defscript
is based on an implementation's specialisers vector.
All elements of the specialisers vector must match *script-context*
. The
specialisers vector may contain keywords that match if the are in
*script-context*
, sets of keywords that match if any of the set values are
in *script-context*
, or functions that will be passed *script-context*
as
an argument and should return a truth value indicating whether a match
occured.
Mutiple implementations may match the *script-context*
vector, and the
best fit is determined by the highest number of matching specialiser
functions, with ties decided by the earliest defined implementation.
Base infrastructure for script generation, and operating system abstraction. `defscript` defines an abstract script function, that can be implemented for different operating system (and version) targets. `implement` is used to add an implementation to a function defined with `defscript`. Dispatch of `defscript` is based on an implementation's specialisers vector. All elements of the specialisers vector must match `*script-context*`. The specialisers vector may contain keywords that match if the are in `*script-context*`, sets of keywords that match if any of the set values are in `*script-context*`, or functions that will be passed `*script-context*` as an argument and should return a truth value indicating whether a match occured. Mutiple implementations may match the `*script-context*` vector, and the best fit is determined by the highest number of matching specialiser functions, with ties decided by the earliest defined implementation.
Script library for abstracting target host script differences
Script library for abstracting target host script differences
Embed shell script in clojure.
Shell script is embedded by wrapping in the script
macro.
(script (ls)) => "ls"
The result of a script
form is a string.
Embed shell script in clojure. Shell script is embedded by wrapping in the `script` macro. (script (ls)) => "ls" The result of a `script` form is a string.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close