Liking cljdoc? Tell your friends :D

code.tool.refactor.base.expression


rewrite-if-notclj

(rewrite-if-not zloc)

rewrites (if (not ...) ...)

(nav/string (rewrite-if-not (nav/parse-root "(if (not a) b c)"))) => "(if-not a b c)"

(nav/string (rewrite-if-not (nav/parse-root "(if (not a) b)"))) => "(if-not a b)"

rewrites (if (not ...) ...)

(nav/string
 (rewrite-if-not (nav/parse-root "(if (not a) b c)")))
=> "(if-not a b c)"

(nav/string
 (rewrite-if-not (nav/parse-root "(if (not a) b)")))
=> "(if-not a b)"
raw docstring

rewrite-if-to-whenclj

(rewrite-if-to-when zloc)

rewrites (if ... (do ...))

(nav/string (rewrite-if-to-when (nav/parse-root "(if a (do b))"))) => "(when a b)"

rewrites (if ... (do ...))

(nav/string
 (rewrite-if-to-when (nav/parse-root "(if a (do b))")))
=> "(when a b)"
raw docstring

rewrite-not-emptyclj

(rewrite-not-empty zloc)

rewrites (not (empty? ...))

(nav/string (rewrite-not-empty (nav/parse-root "(not (empty? a))"))) => "(seq a)"

rewrites (not (empty? ...))

(nav/string
 (rewrite-not-empty (nav/parse-root "(not (empty? a))")))
=> "(seq a)"
raw docstring

rewrite-not-seqclj

(rewrite-not-seq zloc)

rewrites (not (seq ...))

(nav/string (rewrite-not-seq (nav/parse-root "(not (seq a))"))) => "(empty? a)"

rewrites (not (seq ...))

(nav/string
 (rewrite-not-seq (nav/parse-root "(not (seq a))")))
=> "(empty? a)"
raw docstring

rewrite-when-notclj

(rewrite-when-not zloc)

rewrites (when (not ...) ...)

(nav/string (rewrite-when-not (nav/parse-root "(when (not a) b)"))) => "(when-not a b)"

rewrites (when (not ...) ...)

(nav/string
 (rewrite-when-not (nav/parse-root "(when (not a) b)")))
=> "(when-not a b)"
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close