(tf-case [_ val & options])transforms the case statement to switch representation
transforms the case statement to switch representation
(tf-cond [_ check then & more])transforms cond to branch
transforms `cond` to branch
(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)))))(tf-doto [_ sym & forms])basic transformation for doto syntax
basic transformation for `doto` syntax
(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))
(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))
(tf-lambda-arrow [_ & more])generalized lambda transformation
generalized lambda transformation
(tf-let-bind [_ bindings & body])converts to a statement
converts to a statement
(tf-macroexpand form)macroexpands the current form
macroexpands the current form
(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])])
(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))
(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))
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 |