(if+ cond then else)Allows sharing local variables between condition and then clause.
Use :let [...] form (not nested!) inside and condition and its bindings
will be visible in later and clauses and inside then branch:
(if+ (and (= 1 2) ;; same :let syntax as in doseq/for :let [x 3 y (+ x 4)] ;; x and y visible downstream (> y x))
;; then: x and y visible here!
(+ x y 5)
;; else: no x or y
6)
Allows sharing local variables between condition and then clause.
Use `:let [...]` form (not nested!) inside `and` condition and its bindings
will be visible in later `and` clauses and inside `then` branch:
(if+ (and
(= 1 2)
;; same :let syntax as in doseq/for
:let [x 3
y (+ x 4)]
;; x and y visible downstream
(> y x))
;; then: x and y visible here!
(+ x y 5)
;; else: no x or y
6)(reduce-indexed f init xs)Same as reduce, but f takes [acc el idx]
Same as reduce, but `f` takes [acc el idx]
(squuid-time-millis uuid)Returns time that was used in squuid call, in milliseconds, rounded to the closest second.
Returns time that was used in [[squuid]] call, in milliseconds, rounded to the closest second.
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 |