Liking cljdoc? Tell your friends :D

std.lang.base.grammar-macro


+op-macro+clj


+op-macro-arrow+clj


+op-macro-case+clj


+op-macro-forange+clj


+op-macro-let+clj


+op-macro-xor+clj


tf-caseclj

(tf-case [_ val & options])

transforms the case statement to switch representation

transforms the case statement to switch representation
raw docstring

tf-condclj

(tf-cond [_ check then & more])

transforms cond to branch

transforms `cond` to branch
raw docstring

tf-do-arrowclj

(tf-do-arrow [_ & body])

do:> transformation

(tf-do-arrow '(do:> 1 2 (return 3))) => '((quote ((fn [] 1 2 (return 3)))))

do:> transformation

(tf-do-arrow '(do:>
               1 2 (return 3)))
=> '((quote ((fn [] 1 2 (return 3)))))
raw docstring

tf-dotoclj

(tf-doto [_ sym & forms])

basic transformation for doto syntax

basic transformation for `doto` syntax
raw docstring

tf-forangeclj

(tf-forange [_ [type? sym size params] & body])

creates the forange form

(tf-forange '(forange [i 10] (print i))) => '(for [(var i 0) (< i 10) [(:= i (+ i 1))]] (print i))

(tf-forange '(forange [i [10 3 -2]] (print i))) => '(for [(var i 10) (< i 3) [(:= i (- i 2))]] (print i))

creates the forange form

(tf-forange '(forange [i 10] (print i)))
=> '(for [(var i 0) (< i 10) [(:= i (+ i 1))]] (print i))

(tf-forange '(forange [i [10 3 -2]] (print i)))
=> '(for [(var i 10) (< i 3) [(:= i (- i 2))]] (print i))
raw docstring

tf-ifclj

(tf-if [_ check then & [else]])

transforms if to branch

(tf-if '(if true :A :B)) => '(br* (if true :A) (else :B))

transforms `if` to branch

(tf-if '(if true :A :B))
=> '(br* (if true :A) (else :B))
raw docstring

tf-lambda-arrowclj

(tf-lambda-arrow [_ & more])

generalized lambda transformation

generalized lambda transformation
raw docstring

tf-let-bindclj

(tf-let-bind [_ bindings & body])

converts to a statement

converts to a statement
raw docstring

tf-macroexpandclj

(tf-macroexpand form)

macroexpands the current form

macroexpands the current form
raw docstring

tf-tcondclj

(tf-tcond [_ & more])

transforms the ternary cond

(tf-tcond '(:?> :a a :b b :else c)) => '(:? :a [a (:? :b [b c])])

transforms the ternary cond

(tf-tcond '(:?> :a a :b b :else c))
=> '(:? :a [a (:? :b [b c])])
raw docstring

tf-whenclj

(tf-when [_ check & body])

transforms when to branch

(tf-when '(when true :A :B :C)) => '(br* (if true :A :B :C))

transforms `when` to branch

(tf-when '(when true :A :B :C))
=> '(br* (if true :A :B :C))
raw docstring

tf-xorclj

(tf-xor [_ a b])

transforms to xor using ternary if

(tf-xor '(xor a b)) => '(:? a b (not b))

transforms to xor using ternary if

(tf-xor '(xor a b))
=> '(:? a b (not 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