Liking cljdoc? Tell your friends :D

otarta.util


<err->cljmacro

(<err-> x & forms)

Each of the forms should yield a tuple [err result] wrapped in an async-channel. As long as err is nil, result is passed onto the next form as the first argument. As soon as an err is not nil (or there are no more forms), the tuple is returned.

Example: (go (let [[err result] (<! (<err-> {:url "some-url"} (connect {:keep-alive 10}) (do-query {:some :selector})))] (if err (println "Something went wrong:" err) (println "Query result:" result))))

Each of the forms should yield a tuple [err result] wrapped
in an async-channel. As long as err is nil, result is passed onto
the next form as the first argument. As soon as an err is not
nil (or there are no more forms), the tuple is returned.

Example:
(go
  (let [[err result] (<! (<err-> {:url "some-url"}
                                 (connect {:keep-alive 10})
                                 (do-query {:some :selector})))]
    (if err
      (println "Something went wrong:" err)
      (println "Query result:" result))))
sourceraw docstring

<err->>cljmacro

(<err->> x & forms)

Each of the forms should yield a tuple [err result] wrapped in an async-channel. As long as err is nil, result is passed onto the next form as the last argument. As soon as err is not nil (or there are no more forms), the tuple is returned.

Example: (go (let [[err result] (<! (<err->> connect-opts (connect client)))] (if err (println "Something went wrong:" err) (println "Connect result:" result))))

Each of the forms should yield a tuple [err result] wrapped
in an async-channel. As long as err is nil, result is passed onto
the next form as the last argument. As soon as err is not
nil (or there are no more forms), the tuple is returned.

Example:
(go
  (let [[err result] (<! (<err->> connect-opts
                                  (connect client)))]
    (if err
      (println "Something went wrong:" err)
      (println "Connect result:" result))))
sourceraw docstring

async-mixcljs

source

async-multcljs

source

base10-convertcljs

(base10-convert n base)
(base10-convert n base {:keys [min-length]})
source

empty-chancljs

(empty-chan ch)
source

err->cljmacro

(err-> x & forms)

Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc.

Each form should return a tuple, where the left value is either nil or an error, and the right value is a correct result. Threading stops as soon as a form returns an error.

Threads the expr through the forms. Inserts x as the
second item in the first form, making a list of it if it is not a
list already. If there are more forms, inserts the first form as the
second item in second form, etc.

Each form should return a tuple, where the left value is either nil
or an error, and the right value is a correct result. Threading
stops as soon as a form returns an error.
sourceraw docstring

err->>cljmacro

(err->> x & forms)

Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc.

Each form should return a tuple, where the left value is either nil or an error, and the right value is a correct result. Threading stops as soon as a form returns an error.

Threads the expr through the forms. Inserts x as the last item in
the first form, making a list of it if it is not a list already. If
there are more forms, inserts the first form as the second item in
second form, etc.

Each form should return a tuple, where the left value is either nil
or an error, and the right value is a correct result. Threading
stops as soon as a form returns an error.
sourceraw docstring

in?cljs

(in? coll elm)

true if elm is in coll. (in? '(1 2 3) 1) ;; => true (in? '(1 2 3) 4) ;; => false

true if elm is in coll.
(in? '(1 2 3) 1) ;; => true
(in? '(1 2 3) 4) ;; => false
sourceraw docstring

powers-of-128cljs

source

powers-of-2cljs

source

powers-of-ncljs

(powers-of-n n)
source

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

× close