Liking cljdoc? Tell your friends :D

prpr.stream


catch-stream-errorcljmacro

(catch-stream-error & body)

catch any errors and put them in a StreamError marker

catch any errors and put them in a StreamError marker
sourceraw docstring

close-on-closedclj

(close-on-closed closeable stream)

close a Closeable object (such as an InputStream) when the stream is closed

close a Closeable object (such as an InputStream) when the stream
is closed
sourceraw docstring

count-all-throwclj

(count-all-throw description source)
source

divert-stream-errorsclj

(divert-stream-errors src)

kinda awkward - adapted from connect-via... takes src and returns [err dst]. feeds StreamErrors from src to err, and any other values to dst. closes err and dst when src is exhausted

kinda awkward - adapted from connect-via... takes src and
returns [err dst]. feeds StreamErrors from src to err, and any
other values to dst. closes err and dst when src is exhausted
sourceraw docstring

filter-log-stream-errorsclj

(filter-log-stream-errors description source)

log 2 exemplars of StreamErrors on the source, and then filter them out

log 2 exemplars of StreamErrors on the source, and then filter them out
sourceraw docstring

log-stream-error-exemplarsclj

(log-stream-error-exemplars description n source)
source

not-stream-errorclj

(not-stream-error description v)

if v is a stream-error, log it and return nil, otherwise return v

if v is a stream-error, log it and return nil, otherwise return v
sourceraw docstring

realize-streamclj

(realize-stream v)
source

reduce-all-throwclj

(reduce-all-throw description f source)
(reduce-all-throw description f init source)

reduce a stream, but if there are any errors will log exemplars and return an error-deferred with the first error. always reduces the entire stream, as if any errors were filtered

reduce a stream, but if there are any errors will log
exemplars and return an error-deferred with the first error. always
reduces the entire stream, as if any errors were filtered
sourceraw docstring

reduce-catchclj

(reduce-catch description f source)
(reduce-catch description f init source)

reduce, but with any errors caught and exemplars logged

reduce, but with any errors caught and exemplars logged
sourceraw docstring

s-firstclj

(s-first source)
(s-first no-val source)

consume a stream completely, returning a Deferred of the first value from the stream, if any. returns Deferred<no-val> if the stream is empty

consume a stream completely, returning a Deferred of the first value from
the stream, if any. returns Deferred<no-val> if the stream is empty
sourceraw docstring

stream-error?clj

(stream-error? v)
source

stream-peekclj

(stream-peek stream)
(stream-peek stream default-val)

peeks the first value from a stream, returning [val new-stream] where val is the first value and new-stream is a new-stream with the same content as the input stream. default-val is returned as the val if the input stream is empty

peeks the first value from a stream, returning
[val new-stream] where val is the first value and
new-stream is a new-stream with the same content as the
input stream. default-val is returned as the val if
the input stream is empty
sourceraw docstring

test-realize-streamclj

(test-realize-stream v)

given a possibly deferred stream, realize it as a Deferred<vector>

given a possibly deferred stream,
realize it as a Deferred<vector>
sourceraw docstring

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

× close