Utilities used in the whole project.
Utilities used in the whole project.
      (assoc-computed m & kfs)Function that perform a series of (assoc m k (f m)).
Function that perform a series of `(assoc m k (f m))`.
(augment-computed m & kfs)Function that perform a series of (update m k deep-merge (f m)).
Function that perform a series of `(update m k deep-merge (f m))`.
(augment-v m & kvs)Function that perform a series of (update m k deep-merge v).
Function that perform a series of `(update m k deep-merge v)`.
(branch! & body__10043__auto__)Similar to [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/branch-named!]].
f! is expected to be a symbol that resolves to a function. The name of the branch
will then be (resolve f!).
Similar to [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/branch-named!]]. `f!` is expected to be a symbol that resolves to a function. The name of the branch will then be `(resolve f!)`.
(branch-named! f! n)(branch-named! v f! n)In a threaded operation, will execute f! to the side
and return v as it got it.
Wraps f! with [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-branch*]].
For the middleware used, the operation is named n.
In a threaded operation, will execute `f!` to the side and return `v` as it got it. Wraps `f! with` [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-branch*]]. For the middleware used, the operation is named `n`.
(check f)(check ctxt f)Mark a function as side effect either for use with [[fr.jeremyschoffen.mapiform.core/thread-fns]] (arity 1) or [[clojure.core/->]] (arity 2).
examples:
((side-effect! println) 1)
;1
;=> 1
(-> 1
    inc ; 2
    (thread-fns dec ;1
                (side-effect! println)
                inc) ;2
    (side-effect! println)
    dec);1
;1
;2
;=> 1
Mark a function as side effect either for use with [[fr.jeremyschoffen.mapiform.core/thread-fns]]
(arity 1) or [[clojure.core/->]] (arity 2).
examples:
```clojure
((side-effect! println) 1)
;1
;=> 1
(-> 1
    inc ; 2
    (thread-fns dec ;1
                (side-effect! println)
                inc) ;2
    (side-effect! println)
    dec);1
;1
;2
;=> 1
```(def-clone new-name cloned)Define clones with dolly. If the cloned var is a function tries to clone its spec in the spec registry and the mapiform registry.
Define clones with dolly. If the cloned var is a function tries to clone its spec in the spec registry and the mapiform registry.
(do-side-effect! & body__10043__auto__)Simmilar to [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/branch!]] but using the [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-side-effect*]] middelware.
Simmilar to [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/branch!]] but using the [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-side-effect*]] middelware.
(do-side-effect-named! f! n)(do-side-effect-named! v f! n)Same as [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/branch-named!]] except for the middleware used to wrap
f!.
Here [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-side-effect*]] is used.
Same as [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/branch-named!]] except for the middleware used to wrap `f!`. Here [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-side-effect*]] is used.
(ensure-computed m & kvs)Function similar to fr.jeremyschoffen.mbt.alpha.utils/assoc-computed except that it performs
the association to a key only if the map doesn't contains this key yet.
Function similar to [[fr.jeremyschoffen.mbt.alpha.utils/assoc-computed]] except that it performs the association to a key only if the map doesn't contains this key yet.
(ensure-dir! d)Ensure the existence of a directory d.
Returns d.
Ensure the existence of a directory `d`. Returns `d`.
(ensure-parent! p)Ensure that the parent directory of a path p exists.
Return the path p.
Ensure that the parent directory of a path `p` exists. Return the path `p`.
(ensure-v m & kvs)Function similar to assoc except that it performs the association to a key only if the map doesn't contains
this key yet.
Function similar to `assoc` except that it performs the association to a key only if the map doesn't contains this key yet.
(format-recording recorded-side-effects)Transform a record of side effects into a tree that models the succession of events better.
Transform a record of side effects into a tree that models the succession of events better.
(mark-dry-run ctxt)Specify to function using ctxt to work in dry run mode by altering the context's metadata
Specify to function using `ctxt` to work in dry run mode by altering the context's metadata
(param-suggestions & body__10043__auto__)Search the dependencies specs of the function named sym to
find all the potential parameters the function may require.
Search the dependencies specs of the function named `sym` to find all the potential parameters the function may require.
(param-users kw)Return a set of all functions depending on the keyword kw.
Return a set of all functions depending on the keyword `kw`.
(pseudo-ns prefix alias)Create a prefixed ns alias. This macro reduce the amount of namespace we have to type
every time we use a namespecd keyword. For instance mbt uses the :fr.mbt.alpha.project/name config key.
To simplify the use of such key, you can do:
(pseudo-ns fr.mbt.alpha project)
::project/name
;=> :fr.mbt.alpha.project/name
::project/XXX
;=> :fr.mbt.alpha.project/XXX
Under the hood it create the 'fr.mbt.alpha.project namespace in clojure's runtime to make the reader accept it.
Create a prefixed ns alias. This macro reduce the amount of namespace we have to type every time we use a namespecd keyword. For instance mbt uses the `:fr.mbt.alpha.project/name` config key. To simplify the use of such key, you can do: ```clojure (pseudo-ns fr.mbt.alpha project) ::project/name ;=> :fr.mbt.alpha.project/name ::project/XXX ;=> :fr.mbt.alpha.project/XXX ``` Under the hood it create the `'fr.mbt.alpha.project` namespace in clojure's runtime to make the reader accept it.
(pseudo-nss & aliases)Creates namespace aliases using fr.jeremyschoffen.mbt.alpha.utils/pseudo-ns and fixing the
prefix part to fr.mbt.alpha.
(pseudo-nss project project.deps)
::project/name
;=> :fr.mbt.alpha.project/name
::project.deps/file
;=> :fr.mbt.alpha.project.deps/file
Creates namespace aliases using [[fr.jeremyschoffen.mbt.alpha.utils/pseudo-ns]] and fixing the prefix part to `fr.mbt.alpha`. ```clojure (pseudo-nss project project.deps) ::project/name ;=> :fr.mbt.alpha.project/name ::project.deps/file ;=> :fr.mbt.alpha.project.deps/file ```
(record-build & body__10043__auto__)Capture recording of side effects wrapped with [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-record]].
Capture recording of side effects wrapped with [[fr.jeremyschoffen.mbt.alpha.default.threading-utils/wrap-record]].
(safer-path)(safer-path & args)Make a java.nio.file.Path forcing it to be canonical.
If no argument is passed the current dir is returned.
Make a `java.nio.file.Path` forcing it to be canonical. If no argument is passed the current dir is returned.
(side-effect! f)(side-effect! ctxt f)Mark a function as side effect either for use with [[fr.jeremyschoffen.mapiform.core/thread-fns]] (arity 1) or [[clojure.core/->]] (arity 2).
examples:
((side-effect! println) 1)
;1
;=> 1
(-> 1
    inc ; 2
    (thread-fns dec ;1
                (side-effect! println)
                inc) ;2
    (side-effect! println)
    dec);1
;1
;2
;=> 1
Mark a function as side effect either for use with [[fr.jeremyschoffen.mapiform.core/thread-fns]]
(arity 1) or [[clojure.core/->]] (arity 2).
examples:
```clojure
((side-effect! println) 1)
;1
;=> 1
(-> 1
    inc ; 2
    (thread-fns dec ;1
                (side-effect! println)
                inc) ;2
    (side-effect! println)
    dec);1
;1
;2
;=> 1
```(simple-fdef n param-spec)(simple-fdef n param-spec ret)Macro to spec 1-arg functions.
Macro to spec 1-arg functions.
(spec & body__10043__auto__)Get the spec of the function named sym and the specs of its dependencies.
Get the spec of the function named `sym` and the specs of its dependencies.
(spec-op & body__10043__auto__)Declare a spec for a one arg map function.
Declare a spec for a one arg map function.
(strip-keys-nss m)Strip the namespaces of a map's keys.
Strip the namespaces of a map's keys.
(thread-fns v & fns)Function serving a similar purpose than the -> macro. It will  thread a value v through a sequence of
functions fns the result of one function application becoming the argument of the next.
Args:
v: the value to be threadedfns: 1 argument functions that will be applied.Function serving a similar purpose than the `->` macro. It will thread a value `v` through a sequence of functions `fns` the result of one function application becoming the argument of the next. Args: - `v`: the value to be threaded - `fns`: 1 argument functions that will be applied.
(wrapped-side-effect! f wrapper)(wrapped-side-effect! ctxt f wrapper)Similar to [[fr.jeremyschoffen.mapiform.core/side-effect!]] with the added functionnality
of wrapping the function f with the middleware wrapper.
Similar to [[fr.jeremyschoffen.mapiform.core/side-effect!]] with the added functionnality of wrapping the function `f` with the middleware `wrapper`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |