Liking cljdoc? Tell your friends :D

fr.jeremyschoffen.mbt.alpha.utils

Utilities used in the whole project.

Utilities used in the whole project.
      
raw docstring

assoc-computedclj

(assoc-computed m & kfs)
source

augment-computedclj

(augment-computed m & kfs)
source

augment-vclj

(augment-v m & kvs)
source

branch!cljmacro

(branch! & body__10033__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!)`.
sourceraw docstring

branch-named!clj

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

checkclj

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

def-clonecljmacro

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

do-side-effect!cljmacro

(do-side-effect! & body__10033__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.
sourceraw docstring

do-side-effect-named!clj

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

ensure-computedclj

(ensure-computed m & kvs)
source

ensure-dir!clj

(ensure-dir! d)

Ensure the existence of a directory d.

Returns d.

Ensure the existence of a directory `d`.

Returns `d`.
sourceraw docstring

ensure-parent!clj

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

ensure-vclj

(ensure-v m & kvs)
source

mark-dry-runclj

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

param-suggestionscljmacro

(param-suggestions & body__10033__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.
sourceraw docstring

param-usersclj

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

pseudo-nscljmacro

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

pseudo-nsscljmacro

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

record-buildcljmacro

(record-build & body__10033__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]].
sourceraw docstring

safer-pathclj

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

side-effect!clj

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

simple-fdefcljmacro

(simple-fdef n param-spec)
(simple-fdef n param-spec ret)

Macro to spec 1-arg functions.

Macro to spec 1-arg functions. 
sourceraw docstring

speccljmacro

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

spec-opcljmacro

(spec-op & body__10033__auto__)

Declare a spec for a one arg map function.

Declare a spec for a one arg map function.
sourceraw docstring

strip-keys-nssclj

(strip-keys-nss m)
source

thread-fnsclj

(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 threaded
  • fns: 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.
sourceraw docstring

wrapped-side-effect!clj

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

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

× close