Liking cljdoc? Tell your friends :D

tech.thomascothran.pavlov.bthread


bidclj/s

(bid bthread)
(bid bthread event)

nameclj/s

(name bthread)

priorityclj/s

(priority bthread)

reduceclj/s

(reduce f)
(reduce f init)
(reduce f init opts)

Make a bthread from a reducing function.

The function takes the accumulated value and the new event.

The accumulated value is the previous bid, which can have any extra information added to it.

Example

(def bthread
  (b/reduce (fn [{:keys [times-called]} _]
              (when-not (= times-called 3)
                {:request #{:more}
                 :times-called (inc times-called)}))
            {:times-called 0}))
Make a bthread from a reducing function.

The function takes the accumulated value and the
new event.

The accumulated value is the previous bid, which can
have any extra information added to it.

Example
-------
```
(def bthread
  (b/reduce (fn [{:keys [times-called]} _]
              (when-not (= times-called 3)
                {:request #{:more}
                 :times-called (inc times-called)}))
            {:times-called 0}))
```
raw docstring

seqclj/s

(seq xs)
(seq xs opts)

Make a bthread from a sequence. Items in the sequence must be bthreads. If nil is received, the bthread stops.

Make a bthread from a sequence. Items in the sequence
must be bthreads. If nil is received, the bthread stops.
raw docstring

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

× close